@tap-payments/connect 1.3.0 → 1.3.1

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
@@ -109,7 +109,7 @@ const ConnectFullComponent = () => {
109
109
  content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
110
110
  />
111
111
  <title>Auth-JsConnect</title>
112
- <script src="https://connect-auth.b-cdn.net/build-1.3.0/main.js"></script>
112
+ <script src="https://connect-auth.b-cdn.net/build-1.3.1/main.js"></script>
113
113
  </head>
114
114
  <body>
115
115
  <div id="root"></div>
@@ -158,24 +158,25 @@ const ConnectFullComponent = () => {
158
158
 
159
159
  ## Properties
160
160
 
161
- | name | type | description |
162
- | --------------------------- | ----------- | -------------------------------------------------------------------------------------------- |
163
- | publicKey `required` | `string` | Public key of the merchant account provided by Tap Payments |
164
- | domain `required` | `string` | Domain of the merchant |
165
- | language `required` | `Languages` | language flag to control the language of the connect element and only accept [ar,en] |
166
- | country `required` | `string` | Country ISO2 of the merchant |
167
- | scope `required` | `string` | the scope of the merchant |
168
- | lead `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
169
- | mature `required` | `boolean` | Decide the mode of connect |
170
- | board `optional` | `string` | Show/Hide board screens |
171
- | open `required` | `boolean` | Open/Close the connect library |
172
- | boardMaturity `optional` | `boolean` | Decide the board maturity |
173
- | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
174
- | | | it's required only if `mature` is `false` |
175
- | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
176
- | onCreated `optional` | `function` | Callback function to called the the account created successfully |
177
- | | | it calls only if `mature` is `false` |
178
- | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
179
- | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
180
- | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
181
- | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
161
+ | name | type | description |
162
+ | --------------------------- | ----------- | --------------------------------------------------------------------------------------------- |
163
+ | publicKey `required` | `string` | Public key of the merchant account provided by Tap Payments |
164
+ | domain `required` | `string` | Domain of the merchant |
165
+ | language `required` | `Languages` | language flag to control the language of the connect element and only accept [ar,en] |
166
+ | country `required` | `string` | Country ISO2 of the merchant |
167
+ | scope `required` | `string` | the scope of the merchant |
168
+ | lead `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
169
+ | mode `required` | `string` | Decide to show connect as a `popup` or `page` to our connect domain. Default value is `popup` |
170
+ | mature `required` | `boolean` | Decide the mode of connect |
171
+ | board `optional` | `string` | Show/Hide board screens |
172
+ | open `required` | `boolean` | Open/Close the connect library |
173
+ | boardMaturity `optional` | `boolean` | Decide the board maturity |
174
+ | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
175
+ | | | it's required only if `mature` is `false` |
176
+ | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
177
+ | onCreated `optional` | `function` | Callback function to called the the account created successfully |
178
+ | | | it calls only if `mature` is `false` |
179
+ | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
180
+ | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
181
+ | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
182
+ | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
@@ -1,4 +1,4 @@
1
- export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.3.0";
1
+ export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.3.1";
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.3.0';
1
+ export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.3.1';
2
2
  export var Maturity = {
3
3
  FULL: 'full',
4
4
  EXPRESS: 'express'
@@ -114,12 +114,12 @@ export var renderTapConnect = function (props, elementId) { return __awaiter(voi
114
114
  showBoard = board;
115
115
  url_1 = (redirect === null || redirect === void 0 ? void 0 : redirect.url) ||
116
116
  "".concat(CONNECT_URL, "express/?config_token=").concat(token, "leadId=").concat(leadId, "&showBoard=").concat(showBoard, "&boardMaturity=").concat(boardMaturity);
117
- window.open(url_1, '_blank');
117
+ window.location.href = url_1;
118
118
  return [2];
119
119
  }
120
120
  countryCode = country.toLowerCase();
121
121
  url = (redirect === null || redirect === void 0 ? void 0 : redirect.url) || "".concat(CONNECT_URL).concat(countryCode, "?config_token=").concat(token);
122
- window.open(url, '_blank');
122
+ window.location.href = url;
123
123
  return [2];
124
124
  case 2:
125
125
  if (tapConnectInstance) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/connect",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Tap Connect",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",