@tap-payments/auth-jsconnect 2.8.85-development → 2.8.86-beta

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) {
@@ -12,6 +12,7 @@ export declare const ENDPOINT_PATHS: {
12
12
  SANDBOX_BASE_URL: string;
13
13
  PRODUCTION_BASE_URL: string;
14
14
  DEV_BASE_URL: string;
15
+ BETA_BASE_URL: string;
15
16
  BUSINESS_COUNTRIES: string;
16
17
  COUNTRIES: string;
17
18
  IP: string;
@@ -1,6 +1,7 @@
1
1
  var SANDBOX_BASE_URL = 'https://connect-mw.sandbox.tap.company/middleware';
2
2
  var PRODUCTION_BASE_URL = 'https://connect-mw.tap.company/middleware';
3
3
  var DEV_BASE_URL = 'https://connect-mw.dev.tap.company/middleware';
4
+ var BETA_BASE_URL = 'https://connect-mw.beta.tap.company/middleware';
4
5
  var API_BUSINESS_COUNTRIES = 'https://godata.sandbox.tap.company/api/v1/business/country/list';
5
6
  var API_COUNTRIES = 'https://utilities.tap.company/api/v1/country/list';
6
7
  var CURRENCY_PATH = 'https://utilities.tap.company/api/v1/currency/iso';
@@ -69,6 +70,7 @@ export var ENDPOINT_PATHS = {
69
70
  SANDBOX_BASE_URL: SANDBOX_BASE_URL,
70
71
  PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
71
72
  DEV_BASE_URL: DEV_BASE_URL,
73
+ BETA_BASE_URL: BETA_BASE_URL,
72
74
  BUSINESS_COUNTRIES: API_BUSINESS_COUNTRIES,
73
75
  COUNTRIES: API_COUNTRIES,
74
76
  IP: IP_PATH,
@@ -1,5 +1,7 @@
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";
4
+ export declare const CONNECT_BETA_URL = "https://connect.beta.tap.company";
3
5
  export declare const CONNECT_PROD_URL = "https://connect.tap.company";
4
6
  export declare const CLIENT_ORIGIN: string;
5
7
  export declare const TAP_WEBSITE = "https://www.tap.company/";
@@ -1,5 +1,7 @@
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';
4
+ export var CONNECT_BETA_URL = 'https://connect.beta.tap.company';
3
5
  export var CONNECT_PROD_URL = 'https://connect.tap.company';
4
6
  export var CLIENT_ORIGIN = window.location.origin;
5
7
  export var TAP_WEBSITE = 'https://www.tap.company/';
@@ -77,7 +77,7 @@ export var createVerifyTokenBy = createAsyncThunk('board/createVerifyTokenByBoar
77
77
  step_name = data.step_name;
78
78
  if (step_name == BOARD_STEP_STEPS.PHONE_AUTH) {
79
79
  sleep(0).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('BOARD_VERIFY_STEP')); });
80
- return [2, __assign({}, data)];
80
+ return [2, __assign(__assign({}, data), { board_id: boardId })];
81
81
  }
82
82
  return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: data.id, boardInfoId: data.board_info_id })).unwrap()];
83
83
  case 2:
@@ -769,7 +769,7 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
769
769
  case 6:
770
770
  count++;
771
771
  return [3, 1];
772
- case 7: throw new Error('paci_verification_failed');
772
+ case 7: throw new Error('nafath_verification_failed');
773
773
  }
774
774
  });
775
775
  }); });
@@ -1175,6 +1175,7 @@ export var individualSlice = createSlice({
1175
1175
  state.data.individualData.isAuthorized = is_authorized;
1176
1176
  })
1177
1177
  .addCase(retrieveIndividualInfo.rejected, function (state, action) {
1178
+ state.addOrRequestDetailLoading = false;
1178
1179
  state.error = action.error.message;
1179
1180
  })
1180
1181
  .addCase(getIndividualList.pending, function (state) {
@@ -0,0 +1,6 @@
1
+ interface DOBProps {
2
+ onDateClicked?: (flag: boolean) => void;
3
+ readOnly?: boolean;
4
+ }
5
+ declare const DOB: ({ onDateClicked, readOnly }: DOBProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default DOB;
@@ -0,0 +1,47 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useTranslation } from 'react-i18next';
14
+ import { useController, useFormContext } from 'react-hook-form';
15
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
16
+ import { ScreenContainer } from '../../../shared/Containers';
17
+ import { alpha, styled } from '@mui/material/styles';
18
+ import { clearError, authSelector } from '../../../app/auth/authStore';
19
+ import Text from '../../../../components/Text';
20
+ import Calender from '../../../shared/Calender';
21
+ var InputLabelStyled = styled(Text)(function (_a) {
22
+ var theme = _a.theme;
23
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
24
+ });
25
+ var DOB = function (_a) {
26
+ var _b;
27
+ var onDateClicked = _a.onDateClicked, readOnly = _a.readOnly;
28
+ var t = useTranslation().t;
29
+ var control = useFormContext().control;
30
+ var dispatch = useAppDispatch();
31
+ var dobControl = useController({ control: control, name: 'dob' });
32
+ var error = useAppSelector(authSelector).error;
33
+ var handleBirthDateChange = function (data) {
34
+ dobControl.field.onChange(data);
35
+ handleClearError();
36
+ };
37
+ var handleClearError = function () {
38
+ if (error)
39
+ dispatch(clearError());
40
+ };
41
+ var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
42
+ return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
43
+ var spacing = _a.spacing;
44
+ return spacing(2.5, 2.5, 1.5, 2.5);
45
+ } } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, disabled: readOnly, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
46
+ };
47
+ export default DOB;
@@ -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_BETA_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); });
@@ -13,10 +13,10 @@ export var dangerousMessage = function (message, callBack) {
13
13
  export var setBaseUrl = function (publicKey) {
14
14
  var isProd = publicKey.includes('pk_live');
15
15
  if (isProd) {
16
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
16
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.BETA_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_BETA_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.85-development",
3
+ "version": "2.8.86-beta",
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 beta"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {