@tap-payments/connect 2.11.2-beta → 2.12.0-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.
package/README.md CHANGED
@@ -85,7 +85,7 @@ const ConnectComponent = () => {
85
85
  content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
86
86
  />
87
87
  <title>Auth-JsConnect</title>
88
- <script src="https://cdn.tap.company/tap-sdks/connect/build-2.11.1-beta/main.js"></script>
88
+ <script src="https://cdn.tap.company/tap-sdks/connect/build-2.12.0-beta/main.js"></script>
89
89
  </head>
90
90
  <body>
91
91
  <div id="root"></div>
@@ -21,6 +21,7 @@ export interface ConnectProps {
21
21
  settingData?: SettingAsyncData;
22
22
  features?: ConnectFeatures;
23
23
  notification?: Notification;
24
+ region?: string;
24
25
  onError?: (err: Error) => void;
25
26
  onReady?: () => void;
26
27
  onClose?: () => void;
@@ -47,6 +48,7 @@ export interface OriginalConnectProps {
47
48
  features?: ConnectFeatures;
48
49
  notification?: Notification;
49
50
  verifyToken?: string;
51
+ region?: string;
50
52
  onFlowCompleted: (res: object, headers?: Record<string, string>) => void;
51
53
  onError: (err: any) => void;
52
54
  onStepCompleted?: (name: string, info: any) => void;
@@ -1,4 +1,4 @@
1
- export declare const CDN_LIBRARY_BASE_URL = "https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.11.1-beta";
1
+ export declare const CDN_LIBRARY_BASE_URL = "https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.12.1-beta";
2
2
  export declare const Maturity: {
3
3
  readonly FULL: "full";
4
4
  readonly EXPRESS: "express";
@@ -1,4 +1,4 @@
1
- export var CDN_LIBRARY_BASE_URL = 'https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.11.1-beta';
1
+ export var CDN_LIBRARY_BASE_URL = 'https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.12.1-beta';
2
2
  export var Maturity = {
3
3
  FULL: 'full',
4
4
  EXPRESS: 'express'
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
3
  export type ConnectProps = Omit<ConnectAttrs, 'elementId'>;
4
- export declare const TapConnect: React.MemoExoticComponent<(props: ConnectAttrs) => JSX.Element>;
4
+ export declare const TapConnect: React.MemoExoticComponent<(props: ConnectAttrs) => import("react/jsx-runtime").JSX.Element>;
5
5
  export declare const renderTapConnect: (props: ConnectProps, elementId: string) => Promise<any>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- export type ConnectAuthProps = Pick<ConnectAttrs, 'open' | 'domain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'lead' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'features'>;
3
+ export type ConnectAuthProps = Pick<ConnectAttrs, 'open' | 'domain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'lead' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'features' | 'region'>;
4
4
  export declare const TapConnectAuth: React.MemoExoticComponent<(props: ConnectAuthProps & {
5
5
  id?: string;
6
- }) => JSX.Element>;
6
+ }) => import("react/jsx-runtime").JSX.Element>;
7
7
  export declare const renderTapConnectAuth: (props: ConnectAuthProps, elementId: string) => Promise<any>;
@@ -84,7 +84,8 @@ var ConnectAuth = function (props) {
84
84
  onError: props.onError,
85
85
  onReady: props.onReady,
86
86
  onClose: props.onClose,
87
- features: props.features
87
+ features: props.features,
88
+ region: props.region
88
89
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-auth-lib-id').unmount;
89
90
  return function () {
90
91
  unmount();
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- type BankProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ type BankProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapBankProps = BankProps & {
5
5
  verifyToken: string;
6
6
  onBoardButtonClick: (data: Record<string, string>) => void;
7
7
  };
8
8
  export declare const TapBank: React.MemoExoticComponent<(props: TapBankProps & {
9
9
  id?: string;
10
- }) => JSX.Element>;
10
+ }) => import("react/jsx-runtime").JSX.Element>;
11
11
  export declare const renderTapBank: (props: TapBankProps, elementId: string) => Promise<any>;
12
12
  export {};
@@ -87,7 +87,8 @@ var Bank = function (props) {
87
87
  onBoardButtonClick: props.onBoardButtonClick,
88
88
  settingData: props.settingData,
89
89
  onSettingFetched: props.onSettingFetched,
90
- features: props.features
90
+ features: props.features,
91
+ region: props.region
91
92
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-bank-lib-id').unmount;
92
93
  return function () {
93
94
  unmount();
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- export type BoardProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'boardId' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ export type BoardProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'boardId' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapBoardProps = BoardProps & {
5
5
  onBoardButtonClick: (data: Record<string, string>) => void;
6
6
  };
7
7
  export declare const TapBoard: React.MemoExoticComponent<(props: TapBoardProps & {
8
8
  id?: string;
9
- }) => JSX.Element>;
9
+ }) => import("react/jsx-runtime").JSX.Element>;
10
10
  export declare const renderTapBoard: (props: TapBoardProps, elementId: string) => Promise<any>;
@@ -86,7 +86,8 @@ var Board = function (props) {
86
86
  onBoardButtonClick: props.onBoardButtonClick,
87
87
  settingData: props.settingData,
88
88
  onSettingFetched: props.onSettingFetched,
89
- features: props.features
89
+ features: props.features,
90
+ region: props.region
90
91
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-board-lib-id').unmount;
91
92
  return function () {
92
93
  unmount();
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- type BrandProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ type BrandProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapBrandProps = BrandProps & {
5
5
  verifyToken: string;
6
6
  onBoardButtonClick: (data: Record<string, string>) => void;
7
7
  };
8
8
  export declare const TapBrand: React.MemoExoticComponent<(props: TapBrandProps & {
9
9
  id?: string;
10
- }) => JSX.Element>;
10
+ }) => import("react/jsx-runtime").JSX.Element>;
11
11
  export declare const renderTapBrand: (props: TapBrandProps, elementId: string) => Promise<any>;
12
12
  export {};
@@ -87,7 +87,8 @@ var Brand = function (props) {
87
87
  onBoardButtonClick: props.onBoardButtonClick,
88
88
  settingData: props.settingData,
89
89
  onSettingFetched: props.onSettingFetched,
90
- features: props.features
90
+ features: props.features,
91
+ region: props.region
91
92
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-brand-lib-id').unmount;
92
93
  return function () {
93
94
  unmount();
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- type EntityProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ type EntityProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapEntityProps = EntityProps & {
5
5
  verifyToken: string;
6
6
  onBoardButtonClick: (data: Record<string, string>) => void;
7
7
  };
8
8
  export declare const TapEntity: React.MemoExoticComponent<(props: TapEntityProps & {
9
9
  id?: string;
10
- }) => JSX.Element>;
10
+ }) => import("react/jsx-runtime").JSX.Element>;
11
11
  export declare const renderTapEntity: (props: TapEntityProps, elementId: string) => Promise<any>;
12
12
  export {};
@@ -87,7 +87,8 @@ var Entity = function (props) {
87
87
  onBoardButtonClick: props.onBoardButtonClick,
88
88
  settingData: props.settingData,
89
89
  onSettingFetched: props.onSettingFetched,
90
- features: props.features
90
+ features: props.features,
91
+ region: props.region
91
92
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-entity-lib-id').unmount;
92
93
  return function () {
93
94
  unmount();
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- type IndividualProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ type IndividualProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapIndividualProps = IndividualProps & {
5
5
  verifyToken: string;
6
6
  onBoardButtonClick: (data: Record<string, string>) => void;
7
7
  };
8
8
  export declare const TapIndividual: React.MemoExoticComponent<(props: TapIndividualProps & {
9
9
  id?: string;
10
- }) => JSX.Element>;
10
+ }) => import("react/jsx-runtime").JSX.Element>;
11
11
  export declare const renderTapIndividual: (props: TapIndividualProps, elementId: string) => Promise<any>;
12
12
  export {};
@@ -87,7 +87,8 @@ var Individual = function (props) {
87
87
  onBoardButtonClick: props.onBoardButtonClick,
88
88
  settingData: props.settingData,
89
89
  onSettingFetched: props.onSettingFetched,
90
- features: props.features
90
+ features: props.features,
91
+ region: props.region
91
92
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-individual-lib-id').unmount;
92
93
  return function () {
93
94
  unmount();
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- type PasswordProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ type PasswordProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapPasswordProps = PasswordProps & {
5
5
  verifyToken: string;
6
6
  onBoardButtonClick: (data: Record<string, string>) => void;
7
7
  };
8
8
  export declare const TapPassword: React.MemoExoticComponent<(props: TapPasswordProps & {
9
9
  id?: string;
10
- }) => JSX.Element>;
10
+ }) => import("react/jsx-runtime").JSX.Element>;
11
11
  export declare const renderTapPassword: (props: TapPasswordProps, elementId: string) => Promise<any>;
12
12
  export {};
@@ -87,7 +87,8 @@ var Password = function (props) {
87
87
  onBoardButtonClick: props.onBoardButtonClick,
88
88
  settingData: props.settingData,
89
89
  onSettingFetched: props.onSettingFetched,
90
- features: props.features
90
+ features: props.features,
91
+ region: props.region
91
92
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-password-lib-id').unmount;
92
93
  return function () {
93
94
  unmount();
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- type TaxProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features'>;
3
+ type TaxProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'board' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'settingData' | 'onSettingFetched' | 'features' | 'region'>;
4
4
  export type TapTaxProps = TaxProps & {
5
5
  verifyToken: string;
6
6
  onBoardButtonClick: (data: Record<string, string>) => void;
7
7
  };
8
8
  export declare const TapTax: React.MemoExoticComponent<(props: TapTaxProps & {
9
9
  id?: string;
10
- }) => JSX.Element>;
10
+ }) => import("react/jsx-runtime").JSX.Element>;
11
11
  export declare const renderTapTax: (props: TapTaxProps, elementId: string) => Promise<any>;
12
12
  export {};
@@ -87,7 +87,8 @@ var Tax = function (props) {
87
87
  onBoardButtonClick: props.onBoardButtonClick,
88
88
  settingData: props.settingData,
89
89
  onSettingFetched: props.onSettingFetched,
90
- features: props.features
90
+ features: props.features,
91
+ region: props.region
91
92
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-tax-lib-id').unmount;
92
93
  return function () {
93
94
  unmount();
@@ -3,5 +3,5 @@ type ExtraProps = {
3
3
  verifyToken?: string;
4
4
  onBoardButtonClick?: (data: Record<string, string>) => void;
5
5
  };
6
- export declare const wrapLibConfig: ({ publicKey, open, mode, language, country, scope, lead, postURL, onError, onReady, onSuccess, board, verifyToken, domain, onBoardButtonClick, onClose, onCreated, onBoardCompleted, boardMaturity, data, redirectUrl, features, notification }: ConnectProps & ExtraProps) => OriginalConnectProps;
6
+ export declare const wrapLibConfig: ({ publicKey, open, mode, language, country, scope, lead, postURL, onError, onReady, onSuccess, board, verifyToken, domain, onBoardButtonClick, onClose, onCreated, onBoardCompleted, boardMaturity, data, redirectUrl, features, notification, region }: ConnectProps & ExtraProps) => OriginalConnectProps;
7
7
  export {};
@@ -1,5 +1,5 @@
1
1
  export var wrapLibConfig = function (_a) {
2
- var publicKey = _a.publicKey, open = _a.open, mode = _a.mode, language = _a.language, country = _a.country, scope = _a.scope, lead = _a.lead, postURL = _a.postURL, onError = _a.onError, onReady = _a.onReady, onSuccess = _a.onSuccess, board = _a.board, verifyToken = _a.verifyToken, domain = _a.domain, onBoardButtonClick = _a.onBoardButtonClick, onClose = _a.onClose, onCreated = _a.onCreated, onBoardCompleted = _a.onBoardCompleted, boardMaturity = _a.boardMaturity, data = _a.data, redirectUrl = _a.redirectUrl, features = _a.features, notification = _a.notification;
2
+ var publicKey = _a.publicKey, open = _a.open, mode = _a.mode, language = _a.language, country = _a.country, scope = _a.scope, lead = _a.lead, postURL = _a.postURL, onError = _a.onError, onReady = _a.onReady, onSuccess = _a.onSuccess, board = _a.board, verifyToken = _a.verifyToken, domain = _a.domain, onBoardButtonClick = _a.onBoardButtonClick, onClose = _a.onClose, onCreated = _a.onCreated, onBoardCompleted = _a.onBoardCompleted, boardMaturity = _a.boardMaturity, data = _a.data, redirectUrl = _a.redirectUrl, features = _a.features, notification = _a.notification, region = _a.region;
3
3
  return {
4
4
  appInfo: {
5
5
  name: window.location.hostname || window.location.origin
@@ -20,6 +20,7 @@ export var wrapLibConfig = function (_a) {
20
20
  verifyToken: verifyToken,
21
21
  features: features,
22
22
  notification: notification,
23
+ region: region,
23
24
  onFlowCompleted: function (res) {
24
25
  onSuccess && onSuccess(res);
25
26
  },
@@ -1,8 +1,8 @@
1
1
  import { ConnectProps } from '../@types';
2
2
  export declare const validateConnectProps: (props: ConnectProps) => void;
3
- export declare const validateConnectAuthProps: (props: Pick<ConnectProps, 'open' | 'domain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'lead' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose'>) => void;
4
- export declare const validateBoardProps: (props: Pick<ConnectProps, 'open' | 'domain' | 'scope' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'boardId'>) => void;
5
- export declare const validateBoardOtherKitsProps: (props: Pick<ConnectProps, "open" | "domain" | "publicKey" | "postURL" | "country" | "language" | "onSuccess" | "onError" | "onReady" | "onClose" | "scope"> & {
3
+ export declare const validateConnectAuthProps: (props: Pick<ConnectProps, 'open' | 'domain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'lead' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'region'>) => void;
4
+ export declare const validateBoardProps: (props: Pick<ConnectProps, 'open' | 'domain' | 'scope' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'boardId' | 'region'>) => void;
5
+ export declare const validateBoardOtherKitsProps: (props: Pick<ConnectProps, "open" | "domain" | "publicKey" | "postURL" | "country" | "language" | "onSuccess" | "onError" | "onReady" | "onClose" | "region" | "scope"> & {
6
6
  verifyToken: string;
7
7
  onBoardButtonClick: (data: Record<string, string>) => void;
8
8
  }) => void;
@@ -1,6 +1,6 @@
1
1
  import { Language } from '../constants';
2
2
  export var validateConnectProps = function (props) {
3
- var mode = props.mode, publicKey = props.publicKey, mature = props.mature, language = props.language, scope = props.scope, open = props.open, domain = props.domain, board = props.board, lead = props.lead, onClose = props.onClose, onCreated = props.onCreated, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, redirectUrl = props.redirectUrl;
3
+ var mode = props.mode, publicKey = props.publicKey, mature = props.mature, language = props.language, scope = props.scope, open = props.open, domain = props.domain, board = props.board, lead = props.lead, onClose = props.onClose, onCreated = props.onCreated, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, redirectUrl = props.redirectUrl, region = props.region;
4
4
  if (!mode) {
5
5
  throw new Error('mode is required');
6
6
  }
@@ -40,6 +40,9 @@ export var validateConnectProps = function (props) {
40
40
  if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
41
41
  throw new Error('postURL must be a string');
42
42
  }
43
+ if (typeof region !== 'undefined' && typeof region !== 'string') {
44
+ throw new Error('region must be a string');
45
+ }
43
46
  if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
44
47
  throw new Error('onClose must be a function');
45
48
  }
@@ -57,7 +60,7 @@ export var validateConnectProps = function (props) {
57
60
  }
58
61
  };
59
62
  export var validateConnectAuthProps = function (props) {
60
- var publicKey = props.publicKey, country = props.country, language = props.language, open = props.open, domain = props.domain, lead = props.lead, onClose = props.onClose, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, data = props.data;
63
+ var publicKey = props.publicKey, country = props.country, language = props.language, open = props.open, domain = props.domain, lead = props.lead, onClose = props.onClose, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, data = props.data, region = props.region;
61
64
  if (!data) {
62
65
  throw new Error('data is required');
63
66
  }
@@ -88,6 +91,9 @@ export var validateConnectAuthProps = function (props) {
88
91
  if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
89
92
  throw new Error('postURL must be a string');
90
93
  }
94
+ if (typeof region !== 'undefined' && typeof region !== 'string') {
95
+ throw new Error('region must be a string');
96
+ }
91
97
  if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
92
98
  throw new Error('onClose must be a function');
93
99
  }
@@ -102,7 +108,7 @@ export var validateConnectAuthProps = function (props) {
102
108
  }
103
109
  };
104
110
  export var validateBoardProps = function (props) {
105
- var publicKey = props.publicKey, country = props.country, scope = props.scope, language = props.language, open = props.open, domain = props.domain, onClose = props.onClose, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, boardId = props.boardId;
111
+ var publicKey = props.publicKey, country = props.country, scope = props.scope, language = props.language, open = props.open, domain = props.domain, onClose = props.onClose, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, boardId = props.boardId, region = props.region;
106
112
  if (!publicKey) {
107
113
  throw new Error('publicKey is required');
108
114
  }
@@ -130,6 +136,9 @@ export var validateBoardProps = function (props) {
130
136
  if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
131
137
  throw new Error('postURL must be a string');
132
138
  }
139
+ if (typeof region !== 'undefined' && typeof region !== 'string') {
140
+ throw new Error('region must be a string');
141
+ }
133
142
  if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
134
143
  throw new Error('onClose must be a function');
135
144
  }
@@ -144,7 +153,7 @@ export var validateBoardProps = function (props) {
144
153
  }
145
154
  };
146
155
  export var validateBoardOtherKitsProps = function (props) {
147
- var publicKey = props.publicKey, country = props.country, scope = props.scope, language = props.language, open = props.open, domain = props.domain, onClose = props.onClose, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, verifyToken = props.verifyToken, onBoardButtonClick = props.onBoardButtonClick;
156
+ var publicKey = props.publicKey, country = props.country, scope = props.scope, language = props.language, open = props.open, domain = props.domain, onClose = props.onClose, onError = props.onError, onReady = props.onReady, onSuccess = props.onSuccess, postURL = props.postURL, verifyToken = props.verifyToken, onBoardButtonClick = props.onBoardButtonClick, region = props.region;
148
157
  if (!publicKey) {
149
158
  throw new Error('publicKey is required');
150
159
  }
@@ -172,6 +181,9 @@ export var validateBoardOtherKitsProps = function (props) {
172
181
  if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
173
182
  throw new Error('postURL must be a string');
174
183
  }
184
+ if (typeof region !== 'undefined' && typeof region !== 'string') {
185
+ throw new Error('region must be a string');
186
+ }
175
187
  if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
176
188
  throw new Error('onClose must be a function');
177
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/connect",
3
- "version": "2.11.2-beta",
3
+ "version": "2.12.0-beta",
4
4
  "description": "Tap Connect",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",
@@ -60,7 +60,7 @@
60
60
  "husky": "^8.0.1",
61
61
  "lint-staged": "^13.0.3",
62
62
  "mini-css-extract-plugin": "^2.6.1",
63
- "prettier": "^2.7.1",
63
+ "prettier": "2.7.1",
64
64
  "sass": "^1.53.0",
65
65
  "sass-loader": "^13.0.2",
66
66
  "style-loader": "^3.3.1",