@tap-payments/connect 0.0.0-test → 0.0.1-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
@@ -1,4 +1,4 @@
1
- # ConnectAuth
1
+ # Connect Package
2
2
 
3
3
  Handling user onboarding and authentication for Tap Payments.
4
4
 
@@ -77,6 +77,8 @@ const ConnectExpressComponent = () => {
77
77
  leadId={'led_6KOZ10239353ps316c20712'}
78
78
  // required (The POST Method URL used to push te data from our server to the merchant server)
79
79
  postURL={'https://example.com'}
80
+ // optional (boolean to show/hide board screen after creating an account)
81
+ showBoard={true}
80
82
  // required (callback function to handle the success response, it will run after the user finish the flow)
81
83
  onSuccess={(data) => console.log('onSuccess', data)}
82
84
  // optional (callback function to handle the error response, it will run if the user face any error)
@@ -100,7 +102,7 @@ const ConnectExpressComponent = () => {
100
102
  content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
101
103
  />
102
104
  <title>Auth-JsConnect</title>
103
- <script src="https://connect-auth.b-cdn.net/build-0.0.5-test/main.js"></script>
105
+ <script src="https://connect-auth.b-cdn.net/build-0.0.0-test/main.js"></script>
104
106
  </head>
105
107
  <body>
106
108
  <div id="root"></div>
@@ -119,6 +121,7 @@ const ConnectExpressComponent = () => {
119
121
  merchantDomain: 'https://example.com',
120
122
  scope: 'merchant',
121
123
  postURL: 'https://example.com',
124
+ showBoard: true,
122
125
  onSuccess: (data) => console.log('onSuccess', data),
123
126
  onError: (err) => console.log('onError', err),
124
127
  onReady: () => console.log('onReady')
@@ -143,7 +146,7 @@ const ConnectExpressComponent = () => {
143
146
  ## Properties
144
147
 
145
148
  | name | type | description |
146
- | ------------------------- | ---------- | -------------------------------------------------------------------------------------------- | --- |
149
+ | ------------------------- | ---------- | -------------------------------------------------------------------------------------------- |
147
150
  | publicKey `required` | `string` | the public key of the merchant account provided by Tap Payments |
148
151
  | open `required` | `boolean` | boolean to open/close the connect element |
149
152
  | country `required` | `string` | the country ISO2 of the merchant |
@@ -154,6 +157,7 @@ const ConnectExpressComponent = () => {
154
157
  | leadId `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
155
158
  | postURL `required` | `string` | The POST Method URL used to push te data from our server to the merchant server |
156
159
  | | | `postURL` is required only if `Maturity.EXPRESS` |
160
+ | showBoard `optional` | `boolean` | Show/hide board screen after creating an account |
157
161
  | onSuccess `required` | `function` | callback function to handle the success response, it will run after the user finish the flow |
158
162
  | onError `optional` | `function` | callback function to handle the error response, it will run if the user face any error |
159
- | onReady `optional` | `function` | callback function to handle the ready state of the connect element | s |
163
+ | onReady `optional` | `function` | callback function to handle the ready state of the connect element |
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { ConnectProps } from '../../@types';
3
- declare const _default: React.MemoExoticComponent<(props: ConnectProps) => JSX.Element>;
3
+ declare const _default: React.MemoExoticComponent<(props: ConnectProps) => null>;
4
4
  export default _default;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { wrapLibConfig } from '../../utils';
3
+ var ConnectFull = function (props) {
4
+ var renderConnectLib = window['TapAuth'].renderConnectLib;
5
+ var id = 'tap-connect-sdk-lib';
6
+ React.useEffect(function () {
7
+ var config = wrapLibConfig(props);
8
+ renderConnectLib(config, id);
9
+ }, [renderConnectLib]);
10
+ return null;
11
+ };
12
+ export default React.memo(ConnectFull);
File without changes
File without changes
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ConnectElement, ConnectProps, renderConnect } from './features/connect';
1
+ import { ConnectElement, ConnectProps, renderConnect } from './features/Connect';
2
2
  import { Maturity } from './constants';
3
3
  export type { ConnectProps };
4
4
  export { renderConnect, ConnectElement, Maturity };
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ConnectElement, renderConnect } from './features/connect';
1
+ import { ConnectElement, renderConnect } from './features/Connect';
2
2
  import { Maturity } from './constants';
3
3
  export { renderConnect, ConnectElement, Maturity };
4
4
  window['Connect'] = {
package/package.json CHANGED
@@ -1,104 +1,104 @@
1
- {
2
- "name": "@tap-payments/connect",
3
- "version": "0.0.0-test",
4
- "description": "Tap Connect",
5
- "main": "build/index.js",
6
- "module": "build/index.js",
7
- "types": "build/index.d.ts",
8
- "files": [
9
- "build",
10
- "README.md"
11
- ],
12
- "scripts": {
13
- "husky:setup": "npx husky install",
14
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
15
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
16
- "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
17
- "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
18
- "start": "cross-env NODE_ENV=development webpack serve",
19
- "build": "cross-env NODE_ENV=production webpack",
20
- "copy:files": "copyfiles -u 1 src/**/*.css build/",
21
- "tsc:alias": "tsc-alias -p tsconfig.json",
22
- "ts:build": "rm -rf build && tsc && yarn tsc:alias && yarn copy:files",
23
- "push": "npm publish --access public"
24
- },
25
- "keywords": [],
26
- "author": {
27
- "name": "Ahmed Elsharkawy",
28
- "email": "a.elsharkawy@tap.company"
29
- },
30
- "license": "ISC",
31
- "devDependencies": {
32
- "@babel/core": "^7.18.6",
33
- "@babel/preset-env": "^7.18.6",
34
- "@babel/preset-react": "^7.18.6",
35
- "@babel/preset-typescript": "^7.18.6",
36
- "@types/crypto-js": "^4.1.1",
37
- "@types/react": "^18.0.15",
38
- "@types/react-dom": "^18.0.6",
39
- "@typescript-eslint/eslint-plugin": "^5.30.5",
40
- "@typescript-eslint/parser": "^5.30.5",
41
- "babel-loader": "^8.2.5",
42
- "copyfiles": "^2.4.1",
43
- "cross-env": "^7.0.3",
44
- "css-loader": "^6.7.1",
45
- "css-minimizer-webpack-plugin": "^4.0.0",
46
- "eslint": "^8.19.0",
47
- "eslint-config-airbnb": "^19.0.4",
48
- "eslint-config-prettier": "^8.5.0",
49
- "eslint-plugin-import": "^2.26.0",
50
- "eslint-plugin-jsx-a11y": "^6.6.0",
51
- "eslint-plugin-node": "^11.1.0",
52
- "eslint-plugin-prettier": "^4.2.1",
53
- "eslint-plugin-react": "^7.30.1",
54
- "eslint-plugin-react-hooks": "^4.6.0",
55
- "file-loader": "^6.2.0",
56
- "fork-ts-checker-webpack-plugin": "^7.2.12",
57
- "html-loader": "^3.1.2",
58
- "html-webpack-plugin": "^5.5.0",
59
- "husky": "^8.0.1",
60
- "lint-staged": "^13.0.3",
61
- "mini-css-extract-plugin": "^2.6.1",
62
- "prettier": "^2.7.1",
63
- "sass": "^1.53.0",
64
- "sass-loader": "^13.0.2",
65
- "style-loader": "^3.3.1",
66
- "terser-webpack-plugin": "^5.3.3",
67
- "tsc-alias": "^1.6.11",
68
- "typescript": "^4.7.4",
69
- "webpack": "^5.73.0",
70
- "webpack-cli": "^4.10.0",
71
- "webpack-dev-server": "^4.9.3",
72
- "webpack-merge": "^5.8.0"
73
- },
74
- "dependencies": {
75
- "@tap-payments/auth-jsconnect": "2.1.23-test",
76
- "react": "^18.2.0",
77
- "react-dom": "^18.2.0"
78
- },
79
- "peerDependencies": {
80
- "@types/react": ">=18.0.15",
81
- "@types/react-dom": ">=18.0.6",
82
- "react": ">=18.2.0",
83
- "react-dom": ">=18.2.0"
84
- },
85
- "lint-staged": {
86
- "src/**/*.{ts,tsx,json,js,jsx}": [
87
- "yarn run prettier:fix",
88
- "yarn run lint",
89
- "git add ."
90
- ]
91
- },
92
- "browserslist": {
93
- "production": [
94
- ">0.2%",
95
- "not dead",
96
- "not op_mini all"
97
- ],
98
- "development": [
99
- "last 1 chrome version",
100
- "last 1 firefox version",
101
- "last 1 safari version"
102
- ]
103
- }
104
- }
1
+ {
2
+ "name": "@tap-payments/connect",
3
+ "version": "0.0.1-test",
4
+ "description": "Tap Connect",
5
+ "main": "build/index.js",
6
+ "module": "build/index.js",
7
+ "types": "build/index.d.ts",
8
+ "files": [
9
+ "build",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "husky:setup": "npx husky install",
14
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
15
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
16
+ "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
17
+ "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
18
+ "start": "cross-env NODE_ENV=development webpack serve",
19
+ "build": "cross-env NODE_ENV=production webpack",
20
+ "copy:files": "copyfiles -u 1 src/**/*.css build/",
21
+ "tsc:alias": "tsc-alias -p tsconfig.json",
22
+ "ts:build": "rm -rf build && tsc && yarn tsc:alias && yarn copy:files",
23
+ "push": "npm publish --access public"
24
+ },
25
+ "keywords": [],
26
+ "author": {
27
+ "name": "Ahmed Elsharkawy",
28
+ "email": "a.elsharkawy@tap.company"
29
+ },
30
+ "license": "ISC",
31
+ "devDependencies": {
32
+ "@babel/core": "^7.18.6",
33
+ "@babel/preset-env": "^7.18.6",
34
+ "@babel/preset-react": "^7.18.6",
35
+ "@babel/preset-typescript": "^7.18.6",
36
+ "@types/crypto-js": "^4.1.1",
37
+ "@types/react": "^18.0.15",
38
+ "@types/react-dom": "^18.0.6",
39
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
40
+ "@typescript-eslint/parser": "^5.30.5",
41
+ "babel-loader": "^8.2.5",
42
+ "copyfiles": "^2.4.1",
43
+ "cross-env": "^7.0.3",
44
+ "css-loader": "^6.7.1",
45
+ "css-minimizer-webpack-plugin": "^4.0.0",
46
+ "eslint": "^8.19.0",
47
+ "eslint-config-airbnb": "^19.0.4",
48
+ "eslint-config-prettier": "^8.5.0",
49
+ "eslint-plugin-import": "^2.26.0",
50
+ "eslint-plugin-jsx-a11y": "^6.6.0",
51
+ "eslint-plugin-node": "^11.1.0",
52
+ "eslint-plugin-prettier": "^4.2.1",
53
+ "eslint-plugin-react": "^7.30.1",
54
+ "eslint-plugin-react-hooks": "^4.6.0",
55
+ "file-loader": "^6.2.0",
56
+ "fork-ts-checker-webpack-plugin": "^7.2.12",
57
+ "html-loader": "^3.1.2",
58
+ "html-webpack-plugin": "^5.5.0",
59
+ "husky": "^8.0.1",
60
+ "lint-staged": "^13.0.3",
61
+ "mini-css-extract-plugin": "^2.6.1",
62
+ "prettier": "^2.7.1",
63
+ "sass": "^1.53.0",
64
+ "sass-loader": "^13.0.2",
65
+ "style-loader": "^3.3.1",
66
+ "terser-webpack-plugin": "^5.3.3",
67
+ "tsc-alias": "^1.6.11",
68
+ "typescript": "^4.7.4",
69
+ "webpack": "^5.73.0",
70
+ "webpack-cli": "^4.10.0",
71
+ "webpack-dev-server": "^4.9.3",
72
+ "webpack-merge": "^5.8.0"
73
+ },
74
+ "dependencies": {
75
+ "@tap-payments/auth-jsconnect": "2.1.23-test",
76
+ "react": "^18.2.0",
77
+ "react-dom": "^18.2.0"
78
+ },
79
+ "peerDependencies": {
80
+ "@types/react": ">=18.0.15",
81
+ "@types/react-dom": ">=18.0.6",
82
+ "react": ">=18.2.0",
83
+ "react-dom": ">=18.2.0"
84
+ },
85
+ "lint-staged": {
86
+ "src/**/*.{ts,tsx,json,js,jsx}": [
87
+ "yarn run prettier:fix",
88
+ "yarn run lint",
89
+ "git add ."
90
+ ]
91
+ },
92
+ "browserslist": {
93
+ "production": [
94
+ ">0.2%",
95
+ "not dead",
96
+ "not op_mini all"
97
+ ],
98
+ "development": [
99
+ "last 1 chrome version",
100
+ "last 1 firefox version",
101
+ "last 1 safari version"
102
+ ]
103
+ }
104
+ }
@@ -1,28 +0,0 @@
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 } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { createElementAndInject } from '../../utils';
15
- var ConnectFull = function (props) {
16
- var renderConnectLib = window['TapAuth'].renderConnectLib;
17
- var id = 'tap-connect-sdk-lib';
18
- React.useEffect(function () {
19
- var config = __assign(__assign({}, props), { appInfo: { name: window.location.hostname } });
20
- if (!renderConnectLib)
21
- return;
22
- var el = createElementAndInject(id);
23
- var unmount = renderConnectLib(el, props).unmount;
24
- return function () { return unmount(); };
25
- }, [renderConnectLib]);
26
- return _jsx("div", { id: id });
27
- };
28
- export default React.memo(ConnectFull);