@tap-payments/connect 2.8.93-development → 2.8.97-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://tap-sdks.b-cdn.net/connect/build-2.8.93-development/main.js"></script>
88
+ <script src="https://tap-sdks.b-cdn.net/connect/build-2.8.97-beta/main.js"></script>
89
89
  </head>
90
90
  <body>
91
91
  <div id="root"></div>
@@ -106,7 +106,7 @@ const ConnectComponent = () => {
106
106
  mature: false,
107
107
  board: true,
108
108
  boardMaturity: false,
109
- mode: "popup",
109
+ mode: "popup",
110
110
  open: true,
111
111
  postURL: 'https://api.example.com/post',
112
112
  redirectUrl: '',
@@ -137,34 +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` 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
- | openAnimationDirection `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when open popup for auth kit |
154
- | closeAnimationDirection `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when close popup for auth kit |
155
- | features `object` | `all values true` | Used to show or hide some fields (poweredBy, merchantLogo - Used to hide the merchant logo and it can be used only for auth kit, switchLanguage, overlay - Used to disable the background color and it can be used only for auth kit, loaderOverlay - Used to disable the loader background color and it can be used only for auth kit, tapTextLogo, closeButton - Used enable to close dialog) |
156
- | loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
157
- | boardMaturity `optional` | `boolean` | Decide the board maturity |
158
- | settingData `optional` | `boolean` | This is to get settings information. It is used board kit and other kits open from board |
159
- | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
160
- | | | it's required only if `mature` is `false` |
161
- | redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
162
- | | | It is `required` if scope is `auth` and mode is `page` |
163
- | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
164
- | onCreated `optional` | `function` | Callback function to called the the account created successfully |
165
- | | | it calls only if `mature` is `false` |
166
- | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
167
- | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
168
- | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
169
- | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
170
- | onSettingFetched `optional` | `function` | Callback function to called after fetch settings information. It is used board kit and other kits open from board |
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
+ | features.dialogStartTransition `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when open popup for auth kit |
154
+ | features.dialogEndTransition `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when close popup for auth kit |
155
+ | features `object` | `all values true` | Used to show or hide some fields (poweredBy, merchantLogo - Used to hide the merchant logo and it can be used only for auth kit, switchLanguage, overlay - Used to disable the background color and it can be used only for auth kit, loaderOverlay - Used to disable the loader background color and it can be used only for auth kit, tapTextLogo, closeButton - Used enable to close dialog, disableNafath - Used to hide nafath login button in **auth** kit, disablePaci - Used to hide paci login button in **auth** kit) |
156
+ | loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
157
+ | boardMaturity `optional` | `boolean` | Decide the board maturity |
158
+ | settingData `optional` | `boolean` | This is to get settings information. It is used board kit and other kits open from board |
159
+ | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
160
+ | | | it's required only if `mature` is `false` |
161
+ | redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
162
+ | | | It is `required` if scope is `auth` and mode is `page` |
163
+ | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
164
+ | onCreated `optional` | `function` | Callback function to called the the account created successfully |
165
+ | | | it calls only if `mature` is `false` |
166
+ | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
167
+ | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
168
+ | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
169
+ | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
170
+ | onSettingFetched `optional` | `function` | Callback function to called after fetch settings information. It is used board kit and other kits open from board |
@@ -19,6 +19,10 @@ export interface ConnectFeatures {
19
19
  loaderOverlay?: boolean;
20
20
  tapTextLogo?: boolean;
21
21
  closeButton?: boolean;
22
+ dialogStartTransition?: 'left' | 'right' | 'up' | 'down';
23
+ dialogEndTransition?: 'left' | 'right' | 'up' | 'down';
24
+ disableNafath?: boolean;
25
+ disablePaci?: boolean;
22
26
  }
23
27
  export interface PaymentProvider {
24
28
  technology_id: string;
@@ -12,8 +12,6 @@ export interface ConnectProps {
12
12
  mode?: 'popup' | 'page' | 'content';
13
13
  board?: boolean;
14
14
  boardMaturity?: boolean;
15
- openAnimationDirection?: 'left' | 'right' | 'up' | 'down';
16
- closeAnimationDirection?: 'left' | 'right' | 'up' | 'down';
17
15
  loaderColor?: string;
18
16
  boardId?: string;
19
17
  open: boolean;
@@ -1,4 +1,4 @@
1
- export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.8.93-development";
1
+ export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.8.97-beta";
2
2
  export declare const Maturity: {
3
3
  readonly FULL: "full";
4
4
  readonly EXPRESS: "express";
@@ -8,7 +8,10 @@ export declare const Language: {
8
8
  readonly AR: "ar";
9
9
  };
10
10
  export declare const CONNECT_URL = "https://connect.tap.company/";
11
+ export declare const CONNECT_BETA_URL = "https://connect.beta.tap.company/";
12
+ export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company/";
11
13
  export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company/";
12
14
  export declare const CONNECT_MW_URL = "https://connect-mw.tap.company/middleware/";
13
- export declare const CONNECT_DEV_MW_URL = "https://connect-mw.dev.tap.company/middleware/";
15
+ export declare const CONNECT_MW_BETA_URL = "https://connect-mw.beta.tap.company/middleware/";
14
16
  export declare const CONNECT_SANDBOX_MW_URL = "https://connect-mw.sandbox.tap.company/middleware/";
17
+ export declare const CONNECT_DEV_MW_URL = "https://connect-mw.dev.tap.company/middleware/";
@@ -1,4 +1,4 @@
1
- export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.8.93-development';
1
+ export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.8.97-beta';
2
2
  export var Maturity = {
3
3
  FULL: 'full',
4
4
  EXPRESS: 'express'
@@ -8,7 +8,10 @@ export var Language = {
8
8
  AR: 'ar'
9
9
  };
10
10
  export var CONNECT_URL = 'https://connect.tap.company/';
11
+ export var CONNECT_BETA_URL = 'https://connect.beta.tap.company/';
12
+ export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company/';
11
13
  export var CONNECT_DEV_URL = 'https://connect.dev.tap.company/';
12
14
  export var CONNECT_MW_URL = 'https://connect-mw.tap.company/middleware/';
13
- export var CONNECT_DEV_MW_URL = 'https://connect-mw.dev.tap.company/middleware/';
15
+ export var CONNECT_MW_BETA_URL = 'https://connect-mw.beta.tap.company/middleware/';
14
16
  export var CONNECT_SANDBOX_MW_URL = 'https://connect-mw.sandbox.tap.company/middleware/';
17
+ export var CONNECT_DEV_MW_URL = 'https://connect-mw.dev.tap.company/middleware/';
@@ -1,6 +1,6 @@
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' | 'openAnimationDirection' | 'closeAnimationDirection'>;
3
+ export type ConnectAuthProps = Pick<ConnectAttrs, 'open' | 'domain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'lead' | 'country' | 'language' | 'onSuccess' | 'onError' | 'onReady' | 'onClose' | 'features'>;
4
4
  export declare const TapConnectAuth: React.MemoExoticComponent<(props: ConnectAuthProps & {
5
5
  id?: string;
6
6
  }) => JSX.Element>;
@@ -84,9 +84,7 @@ var ConnectAuth = function (props) {
84
84
  onError: props.onError,
85
85
  onReady: props.onReady,
86
86
  onClose: props.onClose,
87
- features: props.features,
88
- openAnimationDirection: props.openAnimationDirection,
89
- closeAnimationDirection: props.closeAnimationDirection
87
+ features: props.features
90
88
  }, (_a = props.id) !== null && _a !== void 0 ? _a : 'tap-connect-auth-lib-id').unmount;
91
89
  return function () {
92
90
  unmount();
@@ -1,2 +1,2 @@
1
- export declare const getBaseUrl: (publicKey: string) => "https://connect-mw.tap.company/middleware/" | "https://connect-mw.dev.tap.company/middleware/";
2
- export declare const getRedirectBaseUrl: (publicKey: string) => "https://connect.tap.company/" | "https://connect.dev.tap.company/";
1
+ export declare const getBaseUrl: (publicKey: string) => "https://connect-mw.beta.tap.company/middleware/" | "https://connect-mw.sandbox.tap.company/middleware/";
2
+ export declare const getRedirectBaseUrl: (publicKey: string) => "https://connect.beta.tap.company/" | "https://connect.sandbox.tap.company/";
@@ -1,16 +1,16 @@
1
- import { CONNECT_MW_URL, CONNECT_DEV_MW_URL, CONNECT_DEV_URL, CONNECT_URL } from '../constants';
1
+ import { CONNECT_SANDBOX_MW_URL, CONNECT_SANDBOX_URL, CONNECT_BETA_URL, CONNECT_MW_BETA_URL } from '../constants';
2
2
  var isProd = function (publicKey) {
3
3
  return publicKey.includes('pk_live');
4
4
  };
5
5
  export var getBaseUrl = function (publicKey) {
6
6
  if (isProd(publicKey)) {
7
- return CONNECT_MW_URL;
7
+ return CONNECT_MW_BETA_URL;
8
8
  }
9
- return CONNECT_DEV_MW_URL;
9
+ return CONNECT_SANDBOX_MW_URL;
10
10
  };
11
11
  export var getRedirectBaseUrl = function (publicKey) {
12
12
  if (isProd(publicKey)) {
13
- return CONNECT_URL;
13
+ return CONNECT_BETA_URL;
14
14
  }
15
- return CONNECT_DEV_URL;
15
+ return CONNECT_SANDBOX_URL;
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/connect",
3
- "version": "2.8.93-development",
3
+ "version": "2.8.97-beta",
4
4
  "description": "Tap Connect",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",
@@ -20,7 +20,7 @@
20
20
  "copy:files": "copyfiles -u 1 src/**/*.css build/",
21
21
  "tsc:alias": "tsc-alias -p tsconfig.json",
22
22
  "ts:build": "rm -rf build && tsc && yarn tsc:alias && yarn copy:files",
23
- "push": "npm publish --access public --tag development"
23
+ "push": "npm publish --access public --tag beta"
24
24
  },
25
25
  "keywords": [],
26
26
  "author": {