@tap-payments/auth-jsconnect 1.0.62 → 1.0.63

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.
@@ -56,7 +56,10 @@ export declare type UpdateLeadBody = {
56
56
  license_type?: string;
57
57
  is_acknowledged?: boolean;
58
58
  terms_conditions_accepted?: boolean;
59
- email_url?: string;
59
+ flows?: {
60
+ name: string;
61
+ url: string;
62
+ }[];
60
63
  };
61
64
  export declare type LeadVerifyBody = {
62
65
  verify_token: string;
@@ -35,11 +35,20 @@ export declare const ICONS_NAMES: {
35
35
  ABSHER_LOGO: string;
36
36
  EMAIL_ICON: string;
37
37
  MOBILE_ICON: string;
38
- GMAIL_ICON: string;
39
- OUTLOOK_ICON: string;
40
- APPLE_MAIL_ICON: string;
41
- TAX_ICON: string;
42
- BANK_ICON: string;
43
- INDIVIDUAL_ICON: string;
44
- PASSWORD_ICON: string;
38
+ GMAIL_Filled_ICON: string;
39
+ GMAIL_White_ICON: string;
40
+ outlook_Filled_ICON: string;
41
+ outlook_White_ICON: string;
42
+ Apple_Filled_ICON: string;
43
+ apple_white_icon: string;
44
+ Tax_filled_icon: string;
45
+ Tax_white_icon: string;
46
+ Bank_filled_icon: string;
47
+ Bank_white_icon: string;
48
+ User_filled_icon: string;
49
+ User_white_icon: string;
50
+ Password_filled_icon: string;
51
+ Password_white_icon: string;
52
+ Arrow_filled_right_icon: string;
53
+ Arrow_white_right_icon: string;
45
54
  };
@@ -35,11 +35,20 @@ export var ICONS_NAMES = {
35
35
  ABSHER_LOGO: 'https://dash.b-cdn.net/icons/menu/Absher.svg',
36
36
  EMAIL_ICON: 'https://dash.b-cdn.net/icons/menu/email.png',
37
37
  MOBILE_ICON: 'https://dash.b-cdn.net/icons/menu/mobile.svg',
38
- GMAIL_ICON: 'https://dash.b-cdn.net/icons/menu/gmail-icon.svg',
39
- OUTLOOK_ICON: 'https://dash.b-cdn.net/icons/menu/outlook-icon.svg',
40
- APPLE_MAIL_ICON: 'https://dash.b-cdn.net/icons/menu/apple-icon.svg',
41
- TAX_ICON: 'https://email-templates.b-cdn.net/file.png',
42
- BANK_ICON: 'https://email-templates.b-cdn.net/dollar_square.png',
43
- INDIVIDUAL_ICON: 'https://email-templates.b-cdn.net/user.png',
44
- PASSWORD_ICON: 'https://email-templates.b-cdn.net/lock_square.png'
38
+ GMAIL_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-filled.svg',
39
+ GMAIL_White_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-white.svg',
40
+ outlook_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-filled.svg',
41
+ outlook_White_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-white.svg',
42
+ Apple_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Apple-filled.svg',
43
+ apple_white_icon: 'https://dash.b-cdn.net/icons/menu/Apple-white.svg',
44
+ Tax_filled_icon: 'https://dash.b-cdn.net/icons/menu/tax-filled.svg',
45
+ Tax_white_icon: 'https://dash.b-cdn.net/icons/menu/tax-white.svg',
46
+ Bank_filled_icon: 'https://dash.b-cdn.net/icons/menu/bank-filled.svg',
47
+ Bank_white_icon: 'https://dash.b-cdn.net/icons/menu/bank-white.svg',
48
+ User_filled_icon: 'https://dash.b-cdn.net/icons/menu/user-filled.svg',
49
+ User_white_icon: 'https://dash.b-cdn.net/icons/menu/user-white.svg',
50
+ Password_filled_icon: 'https://dash.b-cdn.net/icons/menu/password-filled.svg',
51
+ Password_white_icon: 'https://dash.b-cdn.net/icons/menu/password-white.svg',
52
+ Arrow_filled_right_icon: 'https://dash.b-cdn.net/icons/menu/right-arrow-filled.svg',
53
+ Arrow_white_right_icon: 'https://dash.b-cdn.net/icons/menu/right-arrow-white.svg'
45
54
  };
@@ -29,7 +29,11 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
29
29
  }, {}>;
30
30
  export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<{
31
31
  data: any;
32
- }, string, {}>;
32
+ licenseNumber: string;
33
+ }, {
34
+ leadId: string;
35
+ licenseNumber: string;
36
+ }, {}>;
33
37
  export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThunk<{
34
38
  data: any;
35
39
  formData: BusinessTypeFormValues;
@@ -58,7 +62,7 @@ export declare const updateCustomersInfo: import("@reduxjs/toolkit").AsyncThunk<
58
62
  export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
59
63
  response: any;
60
64
  formData: void;
61
- }, void, {}>;
65
+ } | undefined, void, {}>;
62
66
  declare type VerifyData = {
63
67
  token: string;
64
68
  };
@@ -60,7 +60,7 @@ import moment from 'moment';
60
60
  import API from '../../../api';
61
61
  import { BusinessType } from '../../../@types';
62
62
  import { BUSINESS_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
63
- import { convertNumbers2English, getClientEmailUrl, removeRequestHeaders } from '../../../utils';
63
+ import { convertNumbers2English, getFlowUrl, removeRequestHeaders } from '../../../utils';
64
64
  import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
65
65
  export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
66
  var settings, countriesBody, businessCountry;
@@ -80,8 +80,9 @@ export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi
80
80
  }); });
81
81
  export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
82
82
  var payload, data, leadResponse;
83
- return __generator(this, function (_a) {
84
- switch (_a.label) {
83
+ var _a, _b, _c;
84
+ return __generator(this, function (_d) {
85
+ switch (_d.label) {
85
86
  case 0:
86
87
  payload = {
87
88
  service_name: 'tap_email',
@@ -89,22 +90,22 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
89
90
  };
90
91
  return [4, API.leadService.verifyLeadToken(payload)];
91
92
  case 1:
92
- data = (_a.sent()).data;
93
+ data = (_d.sent()).data;
93
94
  leadResponse = undefined;
94
95
  if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 4];
95
96
  return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
96
97
  case 2:
97
- leadResponse = _a.sent();
98
- return [4, thunkApi.dispatch(retrieveEntityList(data === null || data === void 0 ? void 0 : data.id))];
98
+ leadResponse = _d.sent();
99
+ return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id, licenseNumber: (_c = (_b = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.entity) === null || _b === void 0 ? void 0 : _b.license) === null || _c === void 0 ? void 0 : _c.number }))];
99
100
  case 3:
100
- _a.sent();
101
+ _d.sent();
101
102
  if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH) {
102
103
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
103
104
  }
104
105
  if (data.step_name === 'business_info') {
105
106
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
106
107
  }
107
- _a.label = 4;
108
+ _d.label = 4;
108
109
  case 4: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
109
110
  }
110
111
  });
@@ -182,14 +183,14 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
182
183
  }
183
184
  });
184
185
  }); });
185
- export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
186
+ export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
186
187
  var data;
187
188
  return __generator(this, function (_a) {
188
189
  switch (_a.label) {
189
- case 0: return [4, API.leadService.retrieveEntityList(leadId)];
190
+ case 0: return [4, API.leadService.retrieveEntityList(params.leadId)];
190
191
  case 1:
191
192
  data = (_a.sent()).data;
192
- return [2, { data: data }];
193
+ return [2, { data: data, licenseNumber: params.licenseNumber }];
193
194
  }
194
195
  });
195
196
  }); });
@@ -340,27 +341,44 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
340
341
  });
341
342
  }); });
342
343
  export var updateLeadSuccess = createAsyncThunk('updateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
343
- var _a, settings, business, response, payload;
344
- var _b, _c, _d, _e, _f, _g;
345
- return __generator(this, function (_h) {
346
- switch (_h.label) {
344
+ var _a, settings, business, id, payload, data;
345
+ var _b, _c, _d, _e;
346
+ return __generator(this, function (_f) {
347
+ switch (_f.label) {
347
348
  case 0:
348
349
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
349
- response = undefined;
350
- if (!!!((_b = business.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.id)) return [3, 2];
350
+ id = (business.data.otpData.responseBody || {}).id;
351
+ if (!id)
352
+ return [2];
351
353
  payload = {
352
354
  step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
353
- id: ((_c = business.data.otpData.responseBody) === null || _c === void 0 ? void 0 : _c.id) || '',
354
- email_url: getClientEmailUrl(),
355
+ id: id,
356
+ flows: [
357
+ {
358
+ name: 'tax',
359
+ url: getFlowUrl('/tax')
360
+ },
361
+ {
362
+ name: 'bank',
363
+ url: getFlowUrl('/bank')
364
+ },
365
+ {
366
+ name: 'individual',
367
+ url: getFlowUrl('/individual')
368
+ },
369
+ {
370
+ name: 'password',
371
+ url: getFlowUrl('/password')
372
+ }
373
+ ],
355
374
  encryption_contract: []
356
375
  };
357
376
  return [4, API.leadService.updateLead(payload)];
358
377
  case 1:
359
- response = _h.sent();
360
- (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
361
- (_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: response === null || response === void 0 ? void 0 : response.data });
362
- _h.label = 2;
363
- case 2: return [2, { response: response === null || response === void 0 ? void 0 : response.data, formData: params }];
378
+ data = (_f.sent()).data;
379
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
380
+ (_e = (_d = settings.data.appConfig).onFlowCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, { data: data });
381
+ return [2, { response: data, formData: params }];
364
382
  }
365
383
  });
366
384
  }); });
@@ -508,10 +526,10 @@ export var businessSlice = createSlice({
508
526
  state.customLoading = true;
509
527
  })
510
528
  .addCase(retrieveEntityList.fulfilled, function (state, action) {
511
- var _a, _b;
529
+ var _a, _b, _c;
512
530
  state.error = null;
513
531
  state.customLoading = false;
514
- var data = action.payload.data;
532
+ var _d = action.payload, data = _d.data, licenseNumber = _d.licenseNumber;
515
533
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
516
534
  var licenseList = [];
517
535
  if (!description) {
@@ -530,9 +548,9 @@ export var businessSlice = createSlice({
530
548
  }
531
549
  licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
532
550
  state.data.businessTypeData.responseBody = { licenseList: licenseList };
533
- var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
551
+ var selectedLicense = ((_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (item) { var _a; return ((_a = item.license) === null || _a === void 0 ? void 0 : _a.number) === licenseNumber; })) || (licenseList === null || licenseList === void 0 ? void 0 : licenseList[0]);
534
552
  state.data.businessTypeData.selectedLicense = selectedLicense;
535
- state.data.businessTypeData.licenseNumber = (_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number;
553
+ state.data.businessTypeData.licenseNumber = (_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number;
536
554
  })
537
555
  .addCase(retrieveEntityList.rejected, function (state, action) {
538
556
  state.error = action.error.message;
@@ -665,7 +683,7 @@ export var businessSlice = createSlice({
665
683
  var _a;
666
684
  state.loading = false;
667
685
  state.error = null;
668
- var response = action.payload.response;
686
+ var response = (action.payload || {}).response;
669
687
  var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
670
688
  if (description) {
671
689
  state.error = description;
@@ -60,7 +60,7 @@ import { handleNextScreenStep } from '../../../app/settings';
60
60
  import API from '../../../api';
61
61
  import { BRAND_LIST, CONNECT_STEP_NAMES, IDENTIFICATION_TYPE, INSTAGRAM_URL, OTHER_BRAND, TWITTER_URL } from '../../../constants';
62
62
  import { defaultCountry } from '../../../constants';
63
- import { getIndividualName, getClientEmailUrl, capitalizeTheFirstLetterOfEachWord, removeRequestHeaders } from '../../../utils';
63
+ import { getIndividualName, getFlowUrl, capitalizeTheFirstLetterOfEachWord, removeRequestHeaders } from '../../../utils';
64
64
  export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
65
65
  var settings, countriesBody, businessCountry;
66
66
  return __generator(this, function (_a) {
@@ -352,7 +352,12 @@ export var updateLeadSuccess = createAsyncThunk('updateLeadSuccess', function (p
352
352
  isExistingUser = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user) === false;
353
353
  payload = {
354
354
  step_name: CONNECT_STEP_NAMES.CONNECT_SUCCESS,
355
- email_url: getClientEmailUrl(),
355
+ flows: [
356
+ {
357
+ name: 'business',
358
+ url: getFlowUrl('/business')
359
+ }
360
+ ],
356
361
  id: (isExistingUser ? (_c = brandData.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id : (_d = otpData.responseBody) === null || _d === void 0 ? void 0 : _d.lead_id) || '',
357
362
  encryption_contract: []
358
363
  };
@@ -96,7 +96,7 @@ var LicenseList = function (_a) {
96
96
  var _a, _b;
97
97
  if ((item === null || item === void 0 ? void 0 : item.type) === BusinessType.FL && !isOtherLicense(item))
98
98
  return t('future_work');
99
- return (isAr ? (_a = item === null || item === void 0 ? void 0 : item.legal_name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.legal_name) === null || _b === void 0 ? void 0 : _b.en) || '';
99
+ return t((isAr ? (_a = item === null || item === void 0 ? void 0 : item.legal_name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.legal_name) === null || _b === void 0 ? void 0 : _b.en) || '');
100
100
  };
101
101
  var isOtherLicense = function (item) {
102
102
  var _a, _b;
@@ -114,8 +114,8 @@ var LicenseList = function (_a) {
114
114
  };
115
115
  var getLicenseFullName = function (item) {
116
116
  if (isAr)
117
- return (_jsxs(_Fragment, { children: [_jsx("span", { children: getLicenseName(item) }), _jsx("span", { children: ' - ' }), _jsx("span", { children: getLicenseNumber(item) })] }));
118
- return (_jsxs(_Fragment, { children: [_jsx("span", { children: getLicenseNumber(item) }), _jsx("span", { children: ' - ' }), _jsx("span", { children: getLicenseName(item) })] }));
117
+ return _jsx("span", { children: "".concat(getLicenseName(item), " - ").concat(getLicenseNumber(item)) });
118
+ return _jsx("span", { children: "".concat(getLicenseNumber(item), " - ").concat(getLicenseName(item)) });
119
119
  };
120
120
  var showLicenseNumber = !anchorEl;
121
121
  var selected = selectedLicenseControl.field.value;
@@ -19,19 +19,15 @@ import Container from '../../../shared/Containers/ScreenContainer';
19
19
  import { FlowsButtons } from '../../../shared/Button';
20
20
  import { ICONS_NAMES } from '../../../../constants';
21
21
  var TextContainerStyled = styled(Box)(function (_a) {
22
- var _b;
23
22
  var theme = _a.theme;
24
- return (_b = {
25
- background: theme.palette.common.white,
26
- border: '1px solid',
27
- width: '100%',
28
- borderColor: theme.palette.divider,
29
- borderRadius: theme.spacing(0, 0, 1.25, 1.25)
30
- },
31
- _b[theme.breakpoints.up('sm')] = {
32
- marginBottom: theme.spacing(7.5)
33
- },
34
- _b);
23
+ return ({
24
+ background: theme.palette.common.white,
25
+ border: '1px solid',
26
+ width: '100%',
27
+ borderColor: theme.palette.divider,
28
+ borderRadius: theme.spacing(0, 0, 1.25, 1.25),
29
+ marginBottom: theme.spacing(7.5)
30
+ });
35
31
  });
36
32
  var TitleStyled = styled(Text)(function (_a) {
37
33
  var theme = _a.theme;
@@ -57,22 +53,26 @@ var SuccessWithFlowButtons = function () {
57
53
  {
58
54
  title: t('tax_flow_pending'),
59
55
  href: '#',
60
- src: ICONS_NAMES.TAX_ICON
56
+ src: ICONS_NAMES.Tax_filled_icon,
57
+ hoverSrc: ICONS_NAMES.Tax_white_icon
61
58
  },
62
59
  {
63
60
  title: t('individual_flow_pending'),
64
61
  href: '#',
65
- src: ICONS_NAMES.INDIVIDUAL_ICON
62
+ src: ICONS_NAMES.User_filled_icon,
63
+ hoverSrc: ICONS_NAMES.User_white_icon
66
64
  },
67
65
  {
68
66
  title: t('bank_flow_pending'),
69
67
  href: '#',
70
- src: ICONS_NAMES.BANK_ICON
68
+ src: ICONS_NAMES.Bank_filled_icon,
69
+ hoverSrc: ICONS_NAMES.Bank_white_icon
71
70
  },
72
71
  {
73
72
  title: t('password_flow_pending'),
74
73
  href: '#',
75
- src: ICONS_NAMES.PASSWORD_ICON
74
+ src: ICONS_NAMES.Password_filled_icon,
75
+ hoverSrc: ICONS_NAMES.Password_white_icon
76
76
  }
77
77
  ] }) })] }));
78
78
  };
@@ -10,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import React from 'react';
13
14
  import Button from '../../../components/Button';
14
15
  import { alpha, styled } from '@mui/material/styles';
15
16
  import Box from '@mui/material/Box';
@@ -91,5 +92,6 @@ var AppleButtonStyled = styled(Button)(function (_a) {
91
92
  });
92
93
  export default function EmailProvidersButtons(_a) {
93
94
  var gmail = _a.gmail, outlook = _a.outlook, apple = _a.apple;
94
- return (_jsxs(ButtonBoxStyled, { children: [_jsx(Link, __assign({ href: gmail.href, underline: 'none', target: '_blank' }, { children: _jsx(GMailButtonStyled, __assign({ startIcon: _jsx(Image, { src: ICONS_NAMES.GMAIL_ICON, alt: gmail.title }), type: 'button' }, { children: gmail.title })) })), _jsx(Link, __assign({ href: apple.href, underline: 'none', target: '_blank' }, { children: _jsx(AppleButtonStyled, __assign({ startIcon: _jsx(Image, { src: ICONS_NAMES.APPLE_MAIL_ICON, alt: apple.title }), type: 'button' }, { children: apple.title })) })), _jsx(Link, __assign({ href: outlook.href, underline: 'none', target: '_blank' }, { children: _jsx(OutlookButtonStyled, __assign({ startIcon: _jsx(Image, { src: ICONS_NAMES.OUTLOOK_ICON, alt: outlook.title }), type: 'button' }, { children: outlook.title })) }))] }));
95
+ var _b = React.useState(), index = _b[0], setIndex = _b[1];
96
+ return (_jsxs(ButtonBoxStyled, { children: [_jsx(Link, __assign({ href: gmail.href, underline: 'none', target: '_blank', onMouseEnter: function () { return setIndex(0); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(GMailButtonStyled, __assign({ startIcon: _jsx(Image, { src: index === 0 ? ICONS_NAMES.GMAIL_White_ICON : ICONS_NAMES.GMAIL_Filled_ICON, alt: gmail.title }), type: 'button' }, { children: gmail.title })) })), _jsx(Link, __assign({ href: apple.href, underline: 'none', target: '_blank', onMouseEnter: function () { return setIndex(1); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(AppleButtonStyled, __assign({ startIcon: _jsx(Image, { src: index === 1 ? ICONS_NAMES.apple_white_icon : ICONS_NAMES.Apple_Filled_ICON, alt: apple.title }), type: 'button' }, { children: apple.title })) })), _jsx(Link, __assign({ href: outlook.href, underline: 'none', target: '_blank', onMouseEnter: function () { return setIndex(2); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(OutlookButtonStyled, __assign({ startIcon: _jsx(Image, { src: index === 2 ? ICONS_NAMES.outlook_White_ICON : ICONS_NAMES.outlook_Filled_ICON, alt: outlook.title }), type: 'button' }, { children: outlook.title })) }))] }));
95
97
  }
@@ -4,6 +4,7 @@ declare type buttonProps = {
4
4
  title: string;
5
5
  href: string;
6
6
  src: string;
7
+ hoverSrc: string;
7
8
  };
8
9
  export interface EmailProvidersButtonsProps extends ButtonProps {
9
10
  buttons: buttonProps[];
@@ -23,7 +23,7 @@ var Image = styled('img', { shouldForwardProp: function (prop) { return prop !==
23
23
  height: theme.spacing(3),
24
24
  fontSize: theme.spacing(3),
25
25
  marginInlineStart: theme.spacing(1),
26
- transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
26
+ transform: theme.direction === 'rtl' ? 'scaleX(-1)' : 'scaleX(1)'
27
27
  });
28
28
  });
29
29
  var ButtonBoxStyled = styled(Box)(function (_a) {
@@ -55,8 +55,8 @@ export default function FlowsButtons(_a) {
55
55
  var buttons = _a.buttons;
56
56
  var _b = React.useState(), index = _b[0], setIndex = _b[1];
57
57
  return (_jsx(ButtonBoxStyled, { children: buttons.map(function (_a, idx) {
58
- var title = _a.title, href = _a.href, src = _a.src;
58
+ var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc;
59
59
  var isLast = idx === buttons.length - 1;
60
- return (_jsx(Link, __assign({ underline: 'none' }, { children: _jsx(ButtonStyled, __assign({ onMouseEnter: function () { return setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); }, sx: { mb: isLast ? 0 : 1.8 }, endIcon: _jsx(Image, { src: index === idx ? ICONS_NAMES.WHITE_ARROW : ICONS_NAMES.BLACK_ARROW }), startIcon: _jsx(Image, { src: src, alt: title }), type: 'button' }, { children: title })) }), idx));
60
+ return (_jsx(Link, __assign({ underline: 'none', onMouseEnter: function () { return setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(ButtonStyled, __assign({ sx: { mb: isLast ? 0 : 1.8 }, endIcon: _jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon }), startIcon: _jsx(Image, { src: index === idx ? hoverSrc : src, alt: title }), type: 'button' }, { children: title })) }), idx));
61
61
  }) }));
62
62
  }
@@ -9,6 +9,7 @@ export declare const getIndividualName: (name: string) => {
9
9
  export declare const convertNumbers2English: (str: string) => string;
10
10
  export declare const getParameterByName: (name: string) => string | null;
11
11
  export declare const getClientEmailUrl: () => string;
12
+ export declare const getFlowUrl: (path: string) => string;
12
13
  export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
13
14
  export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
14
15
  al: string;
@@ -49,6 +49,10 @@ export var getClientEmailUrl = function () {
49
49
  var origin = window.location.origin;
50
50
  return origin + '/?token=';
51
51
  };
52
+ export var getFlowUrl = function (path) {
53
+ var origin = window.location.origin;
54
+ return origin + path + '?token=';
55
+ };
52
56
  export var capitalizeTheFirstLetterOfEachWord = function (words) {
53
57
  var separateWord = words.toLowerCase().split(' ');
54
58
  for (var i = 0; i < separateWord.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",