@tap-payments/auth-jsconnect 2.9.16-development → 2.9.18-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.
@@ -375,6 +375,7 @@
375
375
  "kyc_terms_title": "وثائق قانونية",
376
376
  "kyc_token_invalid": "الرجاء مراجعة رابط المرسل اليك",
377
377
  "kyc_users_description": "يرجى اختيار رقم هوية الممثل المعتمد للموافقة عليه مع {{provider}}",
378
+ "kyc_privacy_policy": "سياسة الخصوصية",
378
379
  "language": "English",
379
380
  "license_info": "معلومات الترخيص",
380
381
  "license_name_hint": "Enter legal name",
@@ -389,6 +389,7 @@
389
389
  "kyc_token_invalid": "May you please verify link of which you are trying to open.",
390
390
  "kyc_users_description": "Please select an authorized registered ID to approve with {{provider}}",
391
391
  "kyc_verification": "Know Your Customer (KYC)",
392
+ "kyc_privacy_policy": "Privacy Policy",
392
393
  "language": "العربية",
393
394
  "license_info": "License information",
394
395
  "license_name_hint": "Enter legal name",
@@ -19,6 +19,8 @@ export declare const EXTERNAL_LINKS: {
19
19
  REFUND_AR: string;
20
20
  TRANSACTION_EN: string;
21
21
  TRANSACTION_AR: string;
22
+ PRIVACY_POLICY_EN: string;
23
+ PRIVACY_POLICY_AR: string;
22
24
  };
23
25
  export declare const DIALOG_ID = "auth-js-connect-dialog";
24
26
  export declare const BACKGROUND_ID = "auth-js-connect-background";
@@ -19,7 +19,9 @@ export var EXTERNAL_LINKS = {
19
19
  REFUND_EN: '/en/terms-conditions',
20
20
  REFUND_AR: '/ar/terms-conditions',
21
21
  TRANSACTION_EN: '/en/terms-conditions',
22
- TRANSACTION_AR: '/ar/terms-conditions'
22
+ TRANSACTION_AR: '/ar/terms-conditions',
23
+ PRIVACY_POLICY_EN: '/en/privacy',
24
+ PRIVACY_POLICY_AR: '/ar/privacy'
23
25
  };
24
26
  export var DIALOG_ID = 'auth-js-connect-dialog';
25
27
  export var BACKGROUND_ID = 'auth-js-connect-background';
@@ -508,7 +510,7 @@ export var BUSINESS_SCREENS_NAVIGATION = [
508
510
  },
509
511
  {
510
512
  name: 'BUSINESS_DOB_STEP',
511
- next: 'BUSINESS_BUSINESS_TYPE_STEP',
513
+ next: ['BUSINESS_BUSINESS_TYPE_STEP', 'BUSINESS_MOBILE_OWNERSHIP'],
512
514
  prev: 'BUSINESS_IDBOD_STEP',
513
515
  order: 2
514
516
  },
@@ -353,7 +353,7 @@ export var verifyNafath = createAsyncThunk('business/verifyNafathParams', functi
353
353
  _h.sent();
354
354
  isNextScreenDob = data.step_name === COLLECT_DOB_INFO_NAFATH;
355
355
  isNextScreenCollectMobileOwnership = data.step_name === BUSINESS_STEP_NAMES.BUSINESS_MOBILE_OWNERSHIP;
356
- if (isSA(business.data.mobileData.countryCode.iso2) && isNextScreenCollectMobileOwnership) {
356
+ if (isNextScreenCollectMobileOwnership) {
357
357
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_MOBILE_OWNERSHIP'));
358
358
  }
359
359
  else {
@@ -577,7 +577,12 @@ export var updateLeadDOB = createAsyncThunk('business/updateLeadDOB', function (
577
577
  _g.sent();
578
578
  _g.label = 4;
579
579
  case 4:
580
- thunkApi.dispatch(handleNextScreenStep());
580
+ if (data.step_name === BUSINESS_STEP_NAMES.BUSINESS_MOBILE_OWNERSHIP) {
581
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_MOBILE_OWNERSHIP'));
582
+ }
583
+ else {
584
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
585
+ }
581
586
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
582
587
  return [2, { data: data, formData: params }];
583
588
  }
@@ -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, isNetworkError } from '../../../utils';
74
+ import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, 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) {
@@ -509,7 +509,7 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
509
509
  leadResponse = _g.sent();
510
510
  leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
511
511
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
512
- if (isSA(leadResponse.country_code) && leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
512
+ if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
513
513
  thunkApi.dispatch(handleNextScreenStep('CONNECT_MOBILE_OWNERSHIP'));
514
514
  }
515
515
  else {
@@ -685,18 +685,18 @@ export var createNIDNafathAuthIdentityAsync = createAsyncThunk('connectExpress/c
685
685
  });
686
686
  }); });
687
687
  export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNafathIdentityAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
688
- var _a, connectExpress, settings, authData, expiry, interval, maxCalls, count, data, isSuccess, isFailed, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen;
689
- var _b, _c, _d, _e, _f, _g, _h;
690
- return __generator(this, function (_j) {
691
- switch (_j.label) {
688
+ var connectExpress, authData, expiry, interval, maxCalls, count, data, isSuccess, isFailed, needToCollectMoreInfo, creatingAccount, askDobInfo, collectPhoneOwnershipScreen;
689
+ var _a, _b, _c, _d, _e, _f, _g;
690
+ return __generator(this, function (_h) {
691
+ switch (_h.label) {
692
692
  case 0:
693
- _a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
693
+ connectExpress = thunkApi.getState().connectExpress;
694
694
  authData = (connectExpress.data.responseData || {}).authData;
695
695
  expiry = (authData === null || authData === void 0 ? void 0 : authData.expiry) || 120;
696
696
  interval = 3;
697
697
  maxCalls = Math.floor(expiry / interval);
698
698
  count = 1;
699
- _j.label = 1;
699
+ _h.label = 1;
700
700
  case 1:
701
701
  if (!(count <= maxCalls)) return [3, 7];
702
702
  if (thunkApi.signal.aborted) {
@@ -704,23 +704,23 @@ export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNa
704
704
  }
705
705
  return [4, API.authService.getExpressTokenVerify({ token: authData === null || authData === void 0 ? void 0 : authData.verify_token, leadId: authData === null || authData === void 0 ? void 0 : authData.lead_id })];
706
706
  case 2:
707
- data = _j.sent();
708
- isSuccess = ((_c = (_b = data.auth) === null || _b === void 0 ? void 0 : _b.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'success';
709
- isFailed = ((_e = (_d = data.auth) === null || _d === void 0 ? void 0 : _d.status) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'failed';
707
+ data = _h.sent();
708
+ isSuccess = ((_b = (_a = data.auth) === null || _a === void 0 ? void 0 : _a.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
709
+ isFailed = ((_d = (_c = data.auth) === null || _c === void 0 ? void 0 : _c.status) === null || _d === void 0 ? void 0 : _d.toLowerCase()) === 'failed';
710
710
  if (isFailed) {
711
- (_f = params.onFailure) === null || _f === void 0 ? void 0 : _f.call(params);
711
+ (_e = params.onFailure) === null || _e === void 0 ? void 0 : _e.call(params);
712
712
  return [2, { data: data }];
713
713
  }
714
714
  if (!isSuccess) return [3, 4];
715
- return [4, thunkApi.dispatch(getLeadByIdAsync((_g = data.auth) === null || _g === void 0 ? void 0 : _g.lead_id)).unwrap()];
715
+ return [4, thunkApi.dispatch(getLeadByIdAsync((_f = data.auth) === null || _f === void 0 ? void 0 : _f.lead_id)).unwrap()];
716
716
  case 3:
717
- _j.sent();
717
+ _h.sent();
718
718
  needToCollectMoreInfo = data.step_name === 'collect_info';
719
719
  creatingAccount = data.step_name === 'create_account';
720
720
  askDobInfo = data.step_name === COLLECT_DOB_INFO_NAFATH;
721
721
  collectPhoneOwnershipScreen = data.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
722
- (_h = params.onSuccess) === null || _h === void 0 ? void 0 : _h.call(params);
723
- if (isSA(settings.data.businessCountry.iso2) && collectPhoneOwnershipScreen) {
722
+ (_g = params.onSuccess) === null || _g === void 0 ? void 0 : _g.call(params);
723
+ if (collectPhoneOwnershipScreen) {
724
724
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('COLLECT_MOBILE_OWNERSHIP')); });
725
725
  }
726
726
  if (askDobInfo) {
@@ -735,8 +735,8 @@ export var verifyNafathIdentityAsync = createAsyncThunk('connectExpress/verifyNa
735
735
  return [2, { data: data, isNextScreenIsDob: askDobInfo }];
736
736
  case 4: return [4, sleep(interval * 1000)];
737
737
  case 5:
738
- _j.sent();
739
- _j.label = 6;
738
+ _h.sent();
739
+ _h.label = 6;
740
740
  case 6:
741
741
  count++;
742
742
  return [3, 1];
@@ -1034,7 +1034,7 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
1034
1034
  needToCollectMoreInfo = data.step_name === 'collect_info';
1035
1035
  creatingAccount = data.step_name === 'create_account';
1036
1036
  collectPhoneOwnershipScreen = data.step_name === CONNECT_EXPRESS_STEP_NAMES.COLLECT_MOBILE_OWNERSHIP;
1037
- if (isSA(settings.data.businessCountry.iso2) && collectPhoneOwnershipScreen) {
1037
+ if (collectPhoneOwnershipScreen) {
1038
1038
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('COLLECT_MOBILE_OWNERSHIP')); });
1039
1039
  }
1040
1040
  if (creatingAccount) {
@@ -1,4 +1,15 @@
1
1
  import React from 'react';
2
+ export declare const LinkStyled: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").LinkBaseProps, "classes"> & {
3
+ children?: React.ReactNode;
4
+ classes?: Partial<import("@mui/material").LinkClasses> | undefined;
5
+ color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined>);
6
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
7
+ TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material").ClassNameMap<never>>) | undefined;
8
+ underline?: "none" | "always" | "hover" | undefined;
9
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
10
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & {
11
+ ref?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject<HTMLAnchorElement> | null | undefined;
12
+ }, "left" | "right" | "type" | keyof import("@mui/material/OverridableComponent").CommonProps | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "translate" | "slot" | "title" | "children" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "underline" | "variant" | "href" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
2
13
  export declare const Terms: () => JSX.Element;
3
14
  declare const _default: React.MemoExoticComponent<() => JSX.Element>;
4
15
  export default _default;
@@ -13,10 +13,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import React, { memo } from 'react';
14
14
  import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
15
15
  import Box from '@mui/material/Box';
16
+ import { Link } from '@mui/material';
16
17
  import { styled } from '@mui/material/styles';
17
18
  import { useAppDispatch, useAppSelector, useLanguage, useSanitizedTranslation } from '../../../../hooks';
18
19
  import { isSA, maskIDNumber } from '../../../../utils';
19
- import { CONNECT_FLOWS } from '../../../../constants';
20
+ import { CONNECT_FLOWS, EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
20
21
  import Button from '../../../shared/Button';
21
22
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
22
23
  import { createNafathAuth, createPaciAuth, kycSelector } from '../../../app/kyc/kycStore';
@@ -32,9 +33,22 @@ var BoxStyled = styled(Box)(function (_a) {
32
33
  fontSize: theme.spacing(1.875),
33
34
  padding: theme.spacing(1.5),
34
35
  borderRadius: theme.spacing(3.875),
35
- textAlign: 'center'
36
+ textAlign: 'center',
37
+ '&:hover': {
38
+ cursor: 'pointer'
39
+ }
40
+ });
41
+ });
42
+ export var LinkStyled = styled(Link)(function (_a) {
43
+ var theme = _a.theme;
44
+ return ({
45
+ color: theme.palette.text.primary,
46
+ textDecoration: 'none'
36
47
  });
37
48
  });
49
+ var getLinkComponent = function (label, link) {
50
+ return (_jsx(LinkStyled, __assign({ href: link, target: '_blank' }, { children: label })));
51
+ };
38
52
  export var Terms = function () {
39
53
  var _a, _b, _c;
40
54
  var st = useSanitizedTranslation();
@@ -45,6 +59,9 @@ export var Terms = function () {
45
59
  var hasOneUserOnly = ((_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.userList) === null || _b === void 0 ? void 0 : _b.length) === 1;
46
60
  var user = hasOneUserOnly ? (_c = data.responseData) === null || _c === void 0 ? void 0 : _c.userList[0] : undefined;
47
61
  var idNumber = user ? maskIDNumber(user.identification.id) : '';
62
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
63
+ var termsAndConditionsLink = isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN;
64
+ var privacyPolicyLink = isAr ? TAP_WEBSITE + EXTERNAL_LINKS.PRIVACY_POLICY_AR : TAP_WEBSITE + EXTERNAL_LINKS.PRIVACY_POLICY_EN;
48
65
  var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
49
66
  var onNext = function () {
50
67
  if (hasOneUserOnly) {
@@ -67,6 +84,6 @@ export var Terms = function () {
67
84
  }
68
85
  dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.users));
69
86
  };
70
- return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, { children: st('kyc_terms_conditions') }), _jsx(BoxStyled, { children: st('kyc_refund_policy') }), _jsx(BoxStyled, __assign({ sx: { mb: error ? 3 : 0 } }, { children: st('kyc_dispute_policy') })), _jsx(Button, __assign({ sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app') }))] }));
87
+ return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, { children: getLinkComponent(st('kyc_terms_conditions'), termsAndConditionsLink) }), _jsx(BoxStyled, { children: getLinkComponent(st('kyc_refund_policy'), termsAndConditionsLink) }), _jsx(BoxStyled, { children: getLinkComponent(st('kyc_dispute_policy'), termsAndConditionsLink) }), _jsx(BoxStyled, __assign({ sx: { mb: error ? 3 : 0 } }, { children: getLinkComponent(st('kyc_privacy_policy'), privacyPolicyLink) })), _jsx(Button, __assign({ sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app') }))] }));
71
88
  };
72
89
  export default memo(Terms);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.9.16-development",
3
+ "version": "2.9.18-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",