@tap-payments/connect 2.6.78-test → 2.6.79-test

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://tap-sdks.b-cdn.net/connect/build-2.6.75-test/main.js"></script>
88
+ <script src="https://tap-sdks.b-cdn.net/connect/build-2.6.79-test/main.js"></script>
89
89
  </head>
90
90
  <body>
91
91
  <div id="root"></div>
@@ -137,35 +137,34 @@ const ConnectComponent = () => {
137
137
 
138
138
  ## Properties
139
139
 
140
- | name | type | description |
141
- | ---------------------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------- |
142
- | publicKey `required` | `string` | Public key of the merchant account provided by Tap Payments |
143
- | domain `required` | `string` | Domain of the merchant |
144
- | language `required` | `Languages` | language flag to control the language of the connect element and only accept [ar,en] |
145
- | country `required` | `string` | Country ISO2 of the merchant |
146
- | scope `required` | `string` | the scope of the merchant available values [merchant, auth] |
147
- | data `optional` | `Array<string>` | Merchant data array `ex: [operator]` |
148
- | lead `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
149
- | mode `required` | `string` | Decide to show connect as a `popup` or `page` to our connect domain. Default value is `popup` |
150
- | mature `required` | `boolean` | Decide the mode of connect `normal` or `express` |
151
- | board `optional` | `string` | Show/Hide board screens |
152
- | open `required` | `boolean` | Open/Close the connect library |
153
- | hideOverlay `optional` | `boolean` | Used to disable the **auth** background color and it can be used only for auth kit |
154
- | hideLoaderOverlay `optional` | `boolean` | Used to disable the **auth** loader background color and it can be used only for auth kit |
155
- | openAnimationDirection `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when open popup for auth kit |
156
- | closeAnimationDirection `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when close popup for auth kit |
157
- | hideMerchantLogo `optional` | `boolean` | Used to hide the **auth** merchant logo and it can be used only for auth kit |
158
- | loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
159
- | showAsContent `optional` | `boolean` | Used to show board kit as content with out any animation and it can be used only for board kit |
160
- | boardMaturity `optional` | `boolean` | Decide the board maturity |
161
- | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
162
- | | | it's required only if `mature` is `false` |
163
- | redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
164
- | | | It is `required` if scope is `auth` and mode is `page` |
165
- | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
166
- | onCreated `optional` | `function` | Callback function to called the the account created successfully |
167
- | | | it calls only if `mature` is `false` |
168
- | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
169
- | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
170
- | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
171
- | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
140
+ | name | type | description |
141
+ | ---------------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
142
+ | publicKey `required` | `string` | Public key of the merchant account provided by Tap Payments |
143
+ | domain `required` | `string` | Domain of the merchant |
144
+ | language `required` | `Languages` | language flag to control the language of the connect element and only accept [ar,en] |
145
+ | country `required` | `string` | Country ISO2 of the merchant |
146
+ | scope `required` | `string` | the scope of the merchant available values [merchant, auth] |
147
+ | data `optional` | `Array<string>` | Merchant data array `ex: [operator]` |
148
+ | lead `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
149
+ | mode `required` | `string` | Decide to show connect as a `popup` or `page` or `content` to our connect domain. Default value is `popup`. `content` mode only used for board kit |
150
+ | mature `required` | `boolean` | Decide the mode of connect `normal` or `express` |
151
+ | board `optional` | `string` | Show/Hide board screens |
152
+ | open `required` | `boolean` | Open/Close the connect library |
153
+ | hideOverlay `optional` | `boolean` | Used to disable the **auth** background color and it can be used only for auth kit |
154
+ | hideLoaderOverlay `optional` | `boolean` | Used to disable the **auth** loader background color and it can be used only for auth kit |
155
+ | openAnimationDirection `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when open popup for auth kit |
156
+ | closeAnimationDirection `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when close popup for auth kit |
157
+ | hideMerchantLogo `optional` | `boolean` | Used to hide the **auth** merchant logo and it can be used only for auth kit |
158
+ | loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
159
+ | boardMaturity `optional` | `boolean` | Decide the board maturity |
160
+ | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
161
+ | | | it's required only if `mature` is `false` |
162
+ | redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
163
+ | | | It is `required` if scope is `auth` and mode is `page` |
164
+ | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
165
+ | onCreated `optional` | `function` | Callback function to called the the account created successfully |
166
+ | | | it calls only if `mature` is `false` |
167
+ | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
168
+ | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
169
+ | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
170
+ | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
@@ -8,7 +8,7 @@ export interface ConnectProps {
8
8
  scope: string;
9
9
  lead?: string;
10
10
  mature: boolean;
11
- mode?: 'popup' | 'page';
11
+ mode?: 'popup' | 'page' | 'content';
12
12
  board?: boolean;
13
13
  boardMaturity?: boolean;
14
14
  hideOverlay?: boolean;
@@ -16,7 +16,6 @@ export interface ConnectProps {
16
16
  hideMerchantLogo?: boolean;
17
17
  openAnimationDirection?: 'left' | 'right' | 'up' | 'down';
18
18
  closeAnimationDirection?: 'left' | 'right' | 'up' | 'down';
19
- showAsContent?: boolean;
20
19
  loaderColor?: string;
21
20
  boardId?: string;
22
21
  open: boolean;
@@ -32,7 +31,7 @@ export interface ConnectProps {
32
31
  }
33
32
  export interface OriginalConnectProps {
34
33
  publicKey: string;
35
- mode?: 'popup' | 'page';
34
+ mode?: 'popup' | 'page' | 'content';
36
35
  open: boolean;
37
36
  merchantDomain: string;
38
37
  language: string;
@@ -1,4 +1,4 @@
1
- export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.6.77-test/";
1
+ export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.6.78-test/";
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://auth-jsconnect.b-cdn.net/build-2.6.77-test/';
1
+ export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.6.78-test/';
2
2
  export var Maturity = {
3
3
  FULL: 'full',
4
4
  EXPRESS: 'express'
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps as ConnectAttrs } from '../../@types';
3
- export type TapBoardProps = Pick<ConnectAttrs, 'open' | 'domain' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'showAsContent' | 'loaderColor' | 'boardId'>;
3
+ export type TapBoardProps = Pick<ConnectAttrs, 'open' | 'mode' | 'scope' | 'domain' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'loaderColor' | 'boardId'>;
4
4
  export declare const TapBoard: React.MemoExoticComponent<(props: TapBoardProps & {
5
5
  id?: string;
6
6
  }) => import("react/jsx-runtime").JSX.Element>;
@@ -67,8 +67,8 @@ var Board = function (props) {
67
67
  var renderBoardLib = window['TapAuth'].renderBoardLib;
68
68
  var unmount = renderBoardLib({
69
69
  open: props.open,
70
- mode: 'popup',
71
- scope: 'auth',
70
+ mode: props.mode,
71
+ scope: props.scope,
72
72
  merchantDomain: props.domain,
73
73
  publicKey: props.publicKey,
74
74
  postURL: props.postURL,
@@ -81,7 +81,6 @@ var Board = function (props) {
81
81
  onError: props.onError,
82
82
  onReady: props.onReady,
83
83
  onClose: props.onClose,
84
- showAsContent: props.showAsContent,
85
84
  loaderColor: props.loaderColor,
86
85
  boardId: props.boardId
87
86
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-board-lib-id').unmount;
@@ -1,4 +1,4 @@
1
1
  import { ConnectProps } from '../@types';
2
2
  export declare const validateConnectProps: (props: ConnectProps) => void;
3
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' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'boardId'>) => void;
4
+ export declare const validateBoardProps: (props: Pick<ConnectProps, 'open' | 'domain' | 'scope' | 'publicKey' | 'postURL' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'boardId'>) => void;
@@ -105,7 +105,7 @@ export var validateConnectAuthProps = function (props) {
105
105
  }
106
106
  };
107
107
  export var validateBoardProps = function (props) {
108
- var publicKey = props.publicKey, country = props.country, 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;
108
+ 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;
109
109
  if (!publicKey) {
110
110
  throw new Error('publicKey is required');
111
111
  }
@@ -115,6 +115,9 @@ export var validateBoardProps = function (props) {
115
115
  if (!language) {
116
116
  throw new Error('language is required');
117
117
  }
118
+ if (!scope) {
119
+ throw new Error('scope is required');
120
+ }
118
121
  if (![Language.AR, Language.EN].includes(language)) {
119
122
  throw new Error('you can only use AR or EN for language');
120
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/connect",
3
- "version": "2.6.78-test",
3
+ "version": "2.6.79-test",
4
4
  "description": "Tap Connect",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",