@tap-payments/auth-jsconnect 2.9.41-development → 2.9.41-sandbox

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.
@@ -33,7 +33,7 @@ var StyledTooltip = styled(function (_a) {
33
33
  var _b;
34
34
  var theme = _a.theme;
35
35
  return (_b = {},
36
- _b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) }),
36
+ _b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)), zIndex: 2147483647 }),
37
37
  _b);
38
38
  });
39
39
  var TextStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
@@ -1,5 +1,6 @@
1
1
  import { ScreenStepNavigation, BusinessType } from '../@types';
2
2
  export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
3
+ export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
3
4
  export declare const CONNECT_PROD_URL = "https://connect.tap.company";
4
5
  export declare const CLIENT_ORIGIN: string;
5
6
  export declare const TAP_WEBSITE = "https://www.tap.company/";
@@ -1,6 +1,7 @@
1
1
  import { BusinessType } from '../@types';
2
2
  import { CONNECT_FLOWS } from './flows';
3
3
  export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
4
+ export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
4
5
  export var CONNECT_PROD_URL = 'https://connect.tap.company';
5
6
  export var CLIENT_ORIGIN = window.location.origin;
6
7
  export var TAP_WEBSITE = 'https://www.tap.company/';
@@ -1,7 +1,10 @@
1
1
  export declare const ICONS_BASE_URL = "https://dash.b-cdn.net";
2
2
  export declare const ICONS_PATH = "/icons/menu";
3
+ export declare const ASSETS_BASE_URL = "https://tap-assets.b-cdn.net";
4
+ export declare const ASSETS_PATH = "/icons/connect";
3
5
  export declare const ICONS_EXTENSION = ".svg";
4
6
  export declare const ICONS_FULL_PATH: string;
7
+ export declare const ASSETS_FULL_PATH: string;
5
8
  export declare const ICONS_NAMES: {
6
9
  SIDE_MENU_CLOSE_ICON: string;
7
10
  SIDE_MENU_CLOSE_ICON_DARK: string;
@@ -44,6 +47,7 @@ export declare const ICONS_NAMES: {
44
47
  NAFATH_LOGO: string;
45
48
  NAFATH_VERIFY_ICON: string;
46
49
  EXPRESS_ERROR_ICON: string;
50
+ TAP_LOGO: string;
47
51
  TAP_EN: string;
48
52
  TAP_AR: string;
49
53
  ID_IMAGE: string;
@@ -1,7 +1,13 @@
1
+ import { ThemeMode } from '../@types';
1
2
  export var ICONS_BASE_URL = 'https://dash.b-cdn.net';
2
3
  export var ICONS_PATH = '/icons/menu';
4
+ export var ASSETS_BASE_URL = 'https://tap-assets.b-cdn.net';
5
+ export var ASSETS_PATH = '/icons/connect';
3
6
  export var ICONS_EXTENSION = '.svg';
4
7
  export var ICONS_FULL_PATH = ICONS_BASE_URL + ICONS_PATH;
8
+ export var ASSETS_FULL_PATH = ASSETS_BASE_URL + ASSETS_PATH;
9
+ var generateAssetPath = function (name, theme) { return "".concat(ASSETS_BASE_URL).concat(ASSETS_PATH, "/").concat(theme, "/").concat(name).concat(ICONS_EXTENSION); };
10
+ var generateLightAssetPath = function (name) { return generateAssetPath(name, ThemeMode.LIGHT); };
5
11
  export var ICONS_NAMES = {
6
12
  SIDE_MENU_CLOSE_ICON: ICONS_FULL_PATH + '/side-menu-close' + ICONS_EXTENSION,
7
13
  SIDE_MENU_CLOSE_ICON_DARK: ICONS_FULL_PATH + '/side-menu-close-dark' + ICONS_EXTENSION,
@@ -41,9 +47,10 @@ export var ICONS_NAMES = {
41
47
  TAP_LOGO_TEXT_AR: ICONS_FULL_PATH + '/tap-white-text-ar' + ICONS_EXTENSION,
42
48
  TAP_LOGO_TEXT_EN: ICONS_FULL_PATH + '/tap-white-text-en' + ICONS_EXTENSION,
43
49
  PACI_VERIFY_ICON: ICONS_FULL_PATH + '/PACI_verify_icon' + '.png',
44
- NAFATH_LOGO: 'https://tap-assets.b-cdn.net/icons/connect/light/nafath_button_logo.svg',
45
- NAFATH_VERIFY_ICON: 'https://tap-assets.b-cdn.net/icons/connect/light/nafath_logo.svg',
50
+ NAFATH_LOGO: generateLightAssetPath('nafath_button_logo'),
51
+ NAFATH_VERIFY_ICON: generateLightAssetPath('nafath_logo'),
46
52
  EXPRESS_ERROR_ICON: ICONS_FULL_PATH + '/EXPRESS_error_icon' + '.svg',
53
+ TAP_LOGO: generateLightAssetPath('tap-logo'),
47
54
  TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
48
55
  TAP_AR: 'https://tap-connecet.b-cdn.net/imgs/tapAR' + ICONS_EXTENSION,
49
56
  ID_IMAGE: 'https://villageofwarwick.org/wp-content/uploads/2020/02/ICON99-512-1.png',
@@ -831,7 +831,7 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
831
831
  case 9:
832
832
  count++;
833
833
  return [3, 1];
834
- case 10: throw new Error('paci_verification_failed');
834
+ case 10: throw new Error('nafath_verification_failed');
835
835
  }
836
836
  });
837
837
  }); });
@@ -1,19 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo } from 'react';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import Box from '@mui/material/Box';
5
5
  import Icon from '../../../components/Icon';
6
6
  import { ICONS_NAMES } from '../../../constants';
7
- import { useLanguage } from '../../../hooks';
8
7
  var BoxStyled = styled(Box)(function (_a) {
9
8
  var _b;
10
9
  var theme = _a.theme;
11
10
  return (_b = {
12
11
  display: 'flex',
13
- flexDirection: 'column',
14
12
  justifyContent: 'center',
15
- alignItems: 'center',
16
- paddingTop: theme.spacing(5)
13
+ paddingTop: theme.spacing(15.75)
17
14
  },
18
15
  _b[theme.breakpoints.down('sm')] = {
19
16
  paddingTop: theme.spacing(11)
@@ -23,20 +20,11 @@ var BoxStyled = styled(Box)(function (_a) {
23
20
  var LogoBadgeStyled = styled(Icon)(function (_a) {
24
21
  var theme = _a.theme;
25
22
  return ({
26
- height: theme.spacing(8.875),
27
- width: theme.spacing(8.875)
28
- });
29
- });
30
- var LogoIconStyled = styled(Icon)(function (_a) {
31
- var theme = _a.theme;
32
- return ({
33
- width: theme.spacing(5.875),
34
- height: theme.spacing(3.625),
35
- marginTop: theme.spacing(2.5)
23
+ height: theme.spacing(9.5),
24
+ width: theme.spacing(19.322)
36
25
  });
37
26
  });
38
27
  var LogoBackground = function () {
39
- var isAr = useLanguage().isAr;
40
- return (_jsxs(BoxStyled, { children: [_jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO_EN_ICON }), _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_LOGO_TEXT_AR : ICONS_NAMES.TAP_LOGO_TEXT_EN, alt: 'tap logo' })] }));
28
+ return (_jsx(BoxStyled, { children: _jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO, alt: 'tap logo' }) }));
41
29
  };
42
30
  export default memo(LogoBackground);
@@ -1,5 +1,5 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
3
3
  import { objectHasValues } from './object';
4
4
  import { isSA } from './string';
5
5
  export var sleep = function (milliseconds) {
@@ -19,7 +19,7 @@ export var setBaseUrl = function (publicKey, countryCode) {
19
19
  axiosInstance.defaults.baseURL = isSA(countryCode) ? ENDPOINT_PATHS.PRODUCTION_BASE_URL_SA : ENDPOINT_PATHS.PRODUCTION_BASE_URL;
20
20
  return;
21
21
  }
22
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
22
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
23
23
  };
24
24
  export var updateLocationUrlWithCountry = function (countryIso2) {
25
25
  var country = countryIso2.toLowerCase();
@@ -38,7 +38,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
38
38
  window.history.replaceState({}, '', newUrl);
39
39
  };
40
40
  export var openConnect = function (pk, countryCode) {
41
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
41
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
42
42
  if (countryCode) {
43
43
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.9.41-development",
3
+ "version": "2.9.41-sandbox",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -21,7 +21,7 @@
21
21
  "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
22
  "tsc:alias": "tsc-alias -p tsconfig.json",
23
23
  "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public --tag development"
24
+ "push": "npm publish --access public --tag sandbox"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {