@tap-payments/auth-jsconnect 2.8.50-development → 2.8.51-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.
@@ -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,5 +1,6 @@
1
1
  import { BusinessType } from '../@types';
2
2
  export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
3
+ export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
3
4
  export var CONNECT_PROD_URL = 'https://connect.tap.company';
4
5
  export var CLIENT_ORIGIN = window.location.origin;
5
6
  export var TAP_WEBSITE = 'https://www.tap.company/';
@@ -65,7 +65,7 @@ import AnimationFlow from '../../components/AnimationFlow';
65
65
  import { store } from '../../app/store';
66
66
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
67
67
  import Collapse from '../../components/Collapse';
68
- import { findOrCreateElementAndInject, sendPageView, isTapDomain, isOtherThanKWOrSA } from '../../utils';
68
+ import { findOrCreateElementAndInject, sendPageView, isTapDomain, isOtherThanKWOrSA, initializeGTM } from '../../utils';
69
69
  import { AUTH_SCREENS_NAVIGATION } from '../../constants';
70
70
  import Background from '../shared/Background';
71
71
  import { FeatureContainer } from '../shared/Containers';
@@ -96,6 +96,7 @@ var Auth = memo(function (_a) {
96
96
  var hideOverlay = ((_b = appConfig.features) === null || _b === void 0 ? void 0 : _b.overlay) === false;
97
97
  React.useEffect(function () {
98
98
  var _a;
99
+ initializeGTM();
99
100
  sendPageView({ title: 'Auth' });
100
101
  dispatch(setLeadId((_a = props.leadId) !== null && _a !== void 0 ? _a : ''));
101
102
  }, []);
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, sendPageView } from '../../utils';
32
+ import { findOrCreateElementAndInject, initializeGTM, sendPageView } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { BANK_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { bankFeatureScreens } from '../featuresScreens';
@@ -45,6 +45,7 @@ var Bank = memo(function (_a) {
45
45
  useStepStartedListener();
46
46
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress, appConfig = data.appConfig;
47
47
  React.useEffect(function () {
48
+ initializeGTM();
48
49
  sendPageView({
49
50
  title: 'Bank'
50
51
  });
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, isTapDomain, sendPageView } from '../../utils';
32
+ import { findOrCreateElementAndInject, initializeGTM, isTapDomain, sendPageView } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { BOARD_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { boardFeatureScreens } from '../featuresScreens';
@@ -46,6 +46,7 @@ var Board = memo(function (_a) {
46
46
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, appConfig = data.appConfig;
47
47
  var dispatch = useAppDispatch();
48
48
  React.useEffect(function () {
49
+ initializeGTM();
49
50
  sendPageView({
50
51
  title: 'Board'
51
52
  });
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, sendPageView } from '../../utils';
32
+ import { findOrCreateElementAndInject, initializeGTM, sendPageView } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { BRAND_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { brandFeatureScreens } from '../featuresScreens';
@@ -45,6 +45,7 @@ var Brand = memo(function (_a) {
45
45
  useStepStartedListener();
46
46
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress, appConfig = data.appConfig;
47
47
  React.useEffect(function () {
48
+ initializeGTM();
48
49
  sendPageView({
49
50
  title: 'Brand'
50
51
  });
@@ -20,7 +20,7 @@ import AnimationFlow from '../../components/AnimationFlow';
20
20
  import { store } from '../../app/store';
21
21
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
22
22
  import Collapse from '../../components/Collapse';
23
- import { getParameterByName, findOrCreateElementAndInject, sendPageView } from '../../utils';
23
+ import { getParameterByName, findOrCreateElementAndInject, sendPageView, initializeGTM } from '../../utils';
24
24
  import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
25
25
  import { businessFeatureScreens } from '../featuresScreens';
26
26
  import Background from '../shared/Background';
@@ -34,6 +34,10 @@ var Business = memo(function (props) {
34
34
  useStepStartedListener();
35
35
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress, appConfig = data.appConfig;
36
36
  var verifyToken = function () {
37
+ initializeGTM();
38
+ sendPageView({
39
+ title: 'Business'
40
+ });
37
41
  var token = getParameterByName('token');
38
42
  var lang = getParameterByName('lang');
39
43
  if (lang)
@@ -41,9 +45,6 @@ var Business = memo(function (props) {
41
45
  if (!token)
42
46
  throw new Error('Auth token is not found!');
43
47
  dispatch(verifyLeadToken(token));
44
- sendPageView({
45
- title: 'Business'
46
- });
47
48
  };
48
49
  useEffect(function () {
49
50
  if (settingLoading || !open)
@@ -67,7 +67,7 @@ import { store } from '../../app/store';
67
67
  import { connectExpressSelector, setIsLeadIdPassed, setLeadId, retrieveLeadIdentityByIdAsync, setDefaultCountryCode } from '../app/connectExpress/connectExpressStore';
68
68
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
69
69
  import Collapse from '../../components/Collapse';
70
- import { isKW, findOrCreateElementAndInject, sendPageView, isOtherThanKWOrSA } from '../../utils';
70
+ import { isKW, findOrCreateElementAndInject, sendPageView, isOtherThanKWOrSA, initializeGTM } from '../../utils';
71
71
  import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
72
72
  import { connectExpressFeatureScreens } from '../featuresScreens';
73
73
  import Background from '../shared/Background';
@@ -93,6 +93,7 @@ var ConnectExpress = memo(function (_a) {
93
93
  useStepStartedListener();
94
94
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, appConfig = data.appConfig;
95
95
  React.useEffect(function () {
96
+ initializeGTM();
96
97
  sendPageView({
97
98
  title: 'Connect Express',
98
99
  connect_flow: 'Express'
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, sendPageView } from '../../utils';
32
+ import { findOrCreateElementAndInject, initializeGTM, sendPageView } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { ENTITY_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { entityFeatureScreens } from '../featuresScreens';
@@ -56,6 +56,7 @@ var Entity = memo(function (_a) {
56
56
  isValidOperator: data.isValidOperator
57
57
  });
58
58
  React.useEffect(function () {
59
+ initializeGTM();
59
60
  sendPageView({
60
61
  title: 'Entity'
61
62
  });
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, sendPageView } from '../../utils';
32
+ import { findOrCreateElementAndInject, initializeGTM, sendPageView } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { individualFeatureScreens } from '../featuresScreens';
@@ -56,6 +56,7 @@ var Individual = memo(function (_a) {
56
56
  isValidOperator: data.isValidOperator
57
57
  });
58
58
  React.useEffect(function () {
59
+ initializeGTM();
59
60
  sendPageView({
60
61
  title: 'Individual'
61
62
  });
@@ -66,7 +66,7 @@ import { store } from '../../app/store';
66
66
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
67
67
  import Collapse from '../../components/Collapse';
68
68
  import { FeatureContainer } from '../shared/Containers';
69
- import { getParameterByName, findOrCreateElementAndInject, sendPageView } from '../../utils';
69
+ import { getParameterByName, findOrCreateElementAndInject, sendPageView, initializeGTM } from '../../utils';
70
70
  import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
71
71
  import { passwordFeatureScreens } from '../featuresScreens';
72
72
  import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
@@ -91,6 +91,7 @@ var Password = memo(function (_a) {
91
91
  boardInfoId = getParameterByName('board_info_id') || '';
92
92
  userId = getParameterByName('user_id') || '';
93
93
  userType = getParameterByName('user_type') || '';
94
+ initializeGTM();
94
95
  sendPageView({
95
96
  title: 'Password'
96
97
  });
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, sendPageView } from '../../utils';
32
+ import { findOrCreateElementAndInject, initializeGTM, sendPageView } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { TAX_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { taxFeatureScreens } from '../featuresScreens';
@@ -45,6 +45,7 @@ var Tax = memo(function (_a) {
45
45
  useStepStartedListener();
46
46
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress, appConfig = data.appConfig;
47
47
  React.useEffect(function () {
48
+ initializeGTM();
48
49
  sendPageView({
49
50
  title: 'Tax'
50
51
  });
@@ -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
  export var sleep = function (milliseconds) {
4
4
  if (milliseconds === void 0) { milliseconds = 1000; }
5
5
  return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
@@ -16,7 +16,7 @@ export var setBaseUrl = function (publicKey) {
16
16
  axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
17
17
  return;
18
18
  }
19
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
19
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
20
20
  };
21
21
  export var updateLocationUrlWithCountry = function (countryIso2) {
22
22
  var country = countryIso2.toLowerCase();
@@ -35,7 +35,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
35
35
  window.history.replaceState({}, '', newUrl);
36
36
  };
37
37
  export var openConnect = function (pk, countryCode) {
38
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
38
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
39
39
  if (countryCode) {
40
40
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.8.50-development",
3
+ "version": "2.8.51-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": {