@tap-payments/connect 2.10.6-beta → 2.10.8-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.
Files changed (52) hide show
  1. package/README.md +171 -171
  2. package/build/@types/config.d.ts +64 -63
  3. package/build/@types/config.js +1 -1
  4. package/build/@types/index.d.ts +74 -74
  5. package/build/@types/index.js +1 -1
  6. package/build/api/index.d.ts +12 -12
  7. package/build/api/index.js +95 -95
  8. package/build/constants/index.d.ts +17 -17
  9. package/build/constants/index.js +17 -17
  10. package/build/features/Connect/Connect.d.ts +5 -5
  11. package/build/features/Connect/Connect.js +156 -150
  12. package/build/features/Connect/ConnectAuth.d.ts +7 -7
  13. package/build/features/Connect/ConnectAuth.js +115 -115
  14. package/build/features/Connect/ConnectBank.d.ts +12 -12
  15. package/build/features/Connect/ConnectBank.js +118 -118
  16. package/build/features/Connect/ConnectBoard.d.ts +10 -10
  17. package/build/features/Connect/ConnectBoard.js +117 -117
  18. package/build/features/Connect/ConnectBrand.d.ts +12 -12
  19. package/build/features/Connect/ConnectBrand.js +118 -118
  20. package/build/features/Connect/ConnectEntity.d.ts +12 -12
  21. package/build/features/Connect/ConnectEntity.js +118 -118
  22. package/build/features/Connect/ConnectExpress.d.ts +4 -4
  23. package/build/features/Connect/ConnectExpress.js +82 -78
  24. package/build/features/Connect/ConnectFull.d.ts +4 -4
  25. package/build/features/Connect/ConnectFull.js +13 -13
  26. package/build/features/Connect/ConnectIndividual.d.ts +12 -12
  27. package/build/features/Connect/ConnectIndividual.js +118 -118
  28. package/build/features/Connect/ConnectPassword.d.ts +12 -12
  29. package/build/features/Connect/ConnectPassword.js +118 -118
  30. package/build/features/Connect/ConnectTax.d.ts +12 -12
  31. package/build/features/Connect/ConnectTax.js +118 -118
  32. package/build/features/Connect/index.d.ts +11 -11
  33. package/build/features/Connect/index.js +10 -10
  34. package/build/hooks/index.d.ts +2 -2
  35. package/build/hooks/index.js +2 -2
  36. package/build/hooks/useScript.d.ts +1 -1
  37. package/build/hooks/useScript.js +39 -39
  38. package/build/hooks/useStyle.d.ts +1 -1
  39. package/build/hooks/useStyle.js +13 -13
  40. package/build/index.d.ts +4 -4
  41. package/build/index.js +14 -14
  42. package/build/utils/common.d.ts +2 -2
  43. package/build/utils/common.js +16 -16
  44. package/build/utils/config.d.ts +7 -7
  45. package/build/utils/config.js +47 -47
  46. package/build/utils/html.d.ts +1 -1
  47. package/build/utils/html.js +9 -9
  48. package/build/utils/index.d.ts +4 -4
  49. package/build/utils/index.js +4 -4
  50. package/build/utils/validation.d.ts +8 -8
  51. package/build/utils/validation.js +190 -190
  52. package/package.json +106 -108
@@ -1,190 +1,190 @@
1
- import { Language } from '../constants';
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;
4
- if (!mode) {
5
- throw new Error('mode is required');
6
- }
7
- if (!['page', 'popup'].includes(mode)) {
8
- throw new Error('you can only use page or popup for mode');
9
- }
10
- if (!publicKey) {
11
- throw new Error('publicKey is required');
12
- }
13
- if (!language) {
14
- throw new Error('language is required');
15
- }
16
- if (![Language.AR, Language.EN].includes(language)) {
17
- throw new Error('you can only use AR or EN for language');
18
- }
19
- if (!scope) {
20
- throw new Error('scope is required');
21
- }
22
- if (scope === 'auth' && mode === 'page' && !redirectUrl) {
23
- throw new Error('redirectUrl is required');
24
- }
25
- if (!domain) {
26
- throw new Error('domain is required');
27
- }
28
- if (typeof open !== 'boolean') {
29
- throw new Error('open is required, and must be a boolean');
30
- }
31
- if (typeof mature !== 'boolean') {
32
- throw new Error('mature is required, and must be a boolean');
33
- }
34
- if (typeof board !== 'undefined' && typeof board !== 'boolean') {
35
- throw new Error('board is required, and must be a boolean');
36
- }
37
- if (typeof lead !== 'undefined' && typeof lead !== 'string') {
38
- throw new Error('lead must be a string');
39
- }
40
- if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
41
- throw new Error('postURL must be a string');
42
- }
43
- if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
44
- throw new Error('onClose must be a function');
45
- }
46
- if (typeof onCreated !== 'undefined' && typeof onCreated !== 'function') {
47
- throw new Error('onCreated must be a function');
48
- }
49
- if (typeof onError !== 'undefined' && typeof onError !== 'function') {
50
- throw new Error('onError must be a function');
51
- }
52
- if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
53
- throw new Error('onReady must be a function');
54
- }
55
- if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
56
- throw new Error('onSuccess must be a function');
57
- }
58
- };
59
- 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;
61
- if (!data) {
62
- throw new Error('data is required');
63
- }
64
- if (!Array.isArray(data)) {
65
- throw new Error('data must be an array');
66
- }
67
- if (!publicKey) {
68
- throw new Error('publicKey is required');
69
- }
70
- if (typeof country !== 'string') {
71
- throw new Error('country should be from type string');
72
- }
73
- if (!language) {
74
- throw new Error('language is required');
75
- }
76
- if (![Language.AR, Language.EN].includes(language)) {
77
- throw new Error('you can only use AR or EN for language');
78
- }
79
- if (!domain) {
80
- throw new Error('domain is required');
81
- }
82
- if (typeof open !== 'boolean') {
83
- throw new Error('open is required, and must be a boolean');
84
- }
85
- if (typeof lead !== 'undefined' && typeof lead !== 'string') {
86
- throw new Error('lead must be a string');
87
- }
88
- if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
89
- throw new Error('postURL must be a string');
90
- }
91
- if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
92
- throw new Error('onClose must be a function');
93
- }
94
- if (typeof onError !== 'undefined' && typeof onError !== 'function') {
95
- throw new Error('onError must be a function');
96
- }
97
- if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
98
- throw new Error('onReady must be a function');
99
- }
100
- if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
101
- throw new Error('onSuccess must be a function');
102
- }
103
- };
104
- 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;
106
- if (!publicKey) {
107
- throw new Error('publicKey is required');
108
- }
109
- if (typeof country !== 'string') {
110
- throw new Error('country should be from type string');
111
- }
112
- if (!language) {
113
- throw new Error('language is required');
114
- }
115
- if (!scope) {
116
- throw new Error('scope is required');
117
- }
118
- if (![Language.AR, Language.EN].includes(language)) {
119
- throw new Error('you can only use AR or EN for language');
120
- }
121
- if (!domain) {
122
- throw new Error('domain is required');
123
- }
124
- if (!boardId) {
125
- throw new Error('board id is required');
126
- }
127
- if (typeof open !== 'boolean') {
128
- throw new Error('open is required, and must be a boolean');
129
- }
130
- if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
131
- throw new Error('postURL must be a string');
132
- }
133
- if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
134
- throw new Error('onClose must be a function');
135
- }
136
- if (typeof onError !== 'undefined' && typeof onError !== 'function') {
137
- throw new Error('onError must be a function');
138
- }
139
- if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
140
- throw new Error('onReady must be a function');
141
- }
142
- if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
143
- throw new Error('onSuccess must be a function');
144
- }
145
- };
146
- 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;
148
- if (!publicKey) {
149
- throw new Error('publicKey is required');
150
- }
151
- if (typeof country !== 'string') {
152
- throw new Error('country should be from type string');
153
- }
154
- if (!language) {
155
- throw new Error('language is required');
156
- }
157
- if (!scope) {
158
- throw new Error('scope is required');
159
- }
160
- if (![Language.AR, Language.EN].includes(language)) {
161
- throw new Error('you can only use AR or EN for language');
162
- }
163
- if (!domain) {
164
- throw new Error('domain is required');
165
- }
166
- if (!verifyToken) {
167
- throw new Error('token is required');
168
- }
169
- if (typeof open !== 'boolean') {
170
- throw new Error('open is required, and must be a boolean');
171
- }
172
- if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
173
- throw new Error('postURL must be a string');
174
- }
175
- if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
176
- throw new Error('onClose must be a function');
177
- }
178
- if (typeof onError !== 'undefined' && typeof onError !== 'function') {
179
- throw new Error('onError must be a function');
180
- }
181
- if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
182
- throw new Error('onReady must be a function');
183
- }
184
- if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
185
- throw new Error('onSuccess must be a function');
186
- }
187
- if (typeof onBoardButtonClick !== 'undefined' && typeof onBoardButtonClick !== 'function') {
188
- throw new Error('onBoardButtonClick must be a function');
189
- }
190
- };
1
+ import { Language } from '../constants';
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;
4
+ if (!mode) {
5
+ throw new Error('mode is required');
6
+ }
7
+ if (!['page', 'popup'].includes(mode)) {
8
+ throw new Error('you can only use page or popup for mode');
9
+ }
10
+ if (!publicKey) {
11
+ throw new Error('publicKey is required');
12
+ }
13
+ if (!language) {
14
+ throw new Error('language is required');
15
+ }
16
+ if (![Language.AR, Language.EN].includes(language)) {
17
+ throw new Error('you can only use AR or EN for language');
18
+ }
19
+ if (!scope) {
20
+ throw new Error('scope is required');
21
+ }
22
+ if (scope === 'auth' && mode === 'page' && !redirectUrl) {
23
+ throw new Error('redirectUrl is required');
24
+ }
25
+ if (!domain) {
26
+ throw new Error('domain is required');
27
+ }
28
+ if (typeof open !== 'boolean') {
29
+ throw new Error('open is required, and must be a boolean');
30
+ }
31
+ if (typeof mature !== 'boolean') {
32
+ throw new Error('mature is required, and must be a boolean');
33
+ }
34
+ if (typeof board !== 'undefined' && typeof board !== 'boolean') {
35
+ throw new Error('board is required, and must be a boolean');
36
+ }
37
+ if (typeof lead !== 'undefined' && typeof lead !== 'string') {
38
+ throw new Error('lead must be a string');
39
+ }
40
+ if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
41
+ throw new Error('postURL must be a string');
42
+ }
43
+ if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
44
+ throw new Error('onClose must be a function');
45
+ }
46
+ if (typeof onCreated !== 'undefined' && typeof onCreated !== 'function') {
47
+ throw new Error('onCreated must be a function');
48
+ }
49
+ if (typeof onError !== 'undefined' && typeof onError !== 'function') {
50
+ throw new Error('onError must be a function');
51
+ }
52
+ if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
53
+ throw new Error('onReady must be a function');
54
+ }
55
+ if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
56
+ throw new Error('onSuccess must be a function');
57
+ }
58
+ };
59
+ 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;
61
+ if (!data) {
62
+ throw new Error('data is required');
63
+ }
64
+ if (!Array.isArray(data)) {
65
+ throw new Error('data must be an array');
66
+ }
67
+ if (!publicKey) {
68
+ throw new Error('publicKey is required');
69
+ }
70
+ if (typeof country !== 'string') {
71
+ throw new Error('country should be from type string');
72
+ }
73
+ if (!language) {
74
+ throw new Error('language is required');
75
+ }
76
+ if (![Language.AR, Language.EN].includes(language)) {
77
+ throw new Error('you can only use AR or EN for language');
78
+ }
79
+ if (!domain) {
80
+ throw new Error('domain is required');
81
+ }
82
+ if (typeof open !== 'boolean') {
83
+ throw new Error('open is required, and must be a boolean');
84
+ }
85
+ if (typeof lead !== 'undefined' && typeof lead !== 'string') {
86
+ throw new Error('lead must be a string');
87
+ }
88
+ if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
89
+ throw new Error('postURL must be a string');
90
+ }
91
+ if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
92
+ throw new Error('onClose must be a function');
93
+ }
94
+ if (typeof onError !== 'undefined' && typeof onError !== 'function') {
95
+ throw new Error('onError must be a function');
96
+ }
97
+ if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
98
+ throw new Error('onReady must be a function');
99
+ }
100
+ if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
101
+ throw new Error('onSuccess must be a function');
102
+ }
103
+ };
104
+ 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;
106
+ if (!publicKey) {
107
+ throw new Error('publicKey is required');
108
+ }
109
+ if (typeof country !== 'string') {
110
+ throw new Error('country should be from type string');
111
+ }
112
+ if (!language) {
113
+ throw new Error('language is required');
114
+ }
115
+ if (!scope) {
116
+ throw new Error('scope is required');
117
+ }
118
+ if (![Language.AR, Language.EN].includes(language)) {
119
+ throw new Error('you can only use AR or EN for language');
120
+ }
121
+ if (!domain) {
122
+ throw new Error('domain is required');
123
+ }
124
+ if (!boardId) {
125
+ throw new Error('board id is required');
126
+ }
127
+ if (typeof open !== 'boolean') {
128
+ throw new Error('open is required, and must be a boolean');
129
+ }
130
+ if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
131
+ throw new Error('postURL must be a string');
132
+ }
133
+ if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
134
+ throw new Error('onClose must be a function');
135
+ }
136
+ if (typeof onError !== 'undefined' && typeof onError !== 'function') {
137
+ throw new Error('onError must be a function');
138
+ }
139
+ if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
140
+ throw new Error('onReady must be a function');
141
+ }
142
+ if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
143
+ throw new Error('onSuccess must be a function');
144
+ }
145
+ };
146
+ 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;
148
+ if (!publicKey) {
149
+ throw new Error('publicKey is required');
150
+ }
151
+ if (typeof country !== 'string') {
152
+ throw new Error('country should be from type string');
153
+ }
154
+ if (!language) {
155
+ throw new Error('language is required');
156
+ }
157
+ if (!scope) {
158
+ throw new Error('scope is required');
159
+ }
160
+ if (![Language.AR, Language.EN].includes(language)) {
161
+ throw new Error('you can only use AR or EN for language');
162
+ }
163
+ if (!domain) {
164
+ throw new Error('domain is required');
165
+ }
166
+ if (!verifyToken) {
167
+ throw new Error('token is required');
168
+ }
169
+ if (typeof open !== 'boolean') {
170
+ throw new Error('open is required, and must be a boolean');
171
+ }
172
+ if (typeof postURL !== 'undefined' && typeof postURL !== 'string') {
173
+ throw new Error('postURL must be a string');
174
+ }
175
+ if (typeof onClose !== 'undefined' && typeof onClose !== 'function') {
176
+ throw new Error('onClose must be a function');
177
+ }
178
+ if (typeof onError !== 'undefined' && typeof onError !== 'function') {
179
+ throw new Error('onError must be a function');
180
+ }
181
+ if (typeof onReady !== 'undefined' && typeof onReady !== 'function') {
182
+ throw new Error('onReady must be a function');
183
+ }
184
+ if (typeof onSuccess !== 'undefined' && typeof onSuccess !== 'function') {
185
+ throw new Error('onSuccess must be a function');
186
+ }
187
+ if (typeof onBoardButtonClick !== 'undefined' && typeof onBoardButtonClick !== 'function') {
188
+ throw new Error('onBoardButtonClick must be a function');
189
+ }
190
+ };
package/package.json CHANGED
@@ -1,108 +1,106 @@
1
- {
2
- "name": "@tap-payments/connect",
3
- "version": "2.10.6-beta",
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
- "prepare": "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
- "ws:ts:build": "rimraf build && tsc && yarn tsc:alias && yarn copy:files",
24
- "push": "npm publish --access public --tag beta"
25
- },
26
- "keywords": [],
27
- "author": {
28
- "name": "Ahmed Elsharkawy",
29
- "email": "a.elsharkawy@tap.company"
30
- },
31
- "license": "ISC",
32
- "devDependencies": {
33
- "@babel/core": "^7.18.6",
34
- "@babel/preset-env": "^7.18.6",
35
- "@babel/preset-react": "^7.18.6",
36
- "@babel/preset-typescript": "^7.18.6",
37
- "@types/axios": "^0.14.0",
38
- "@types/crypto-js": "^4.1.1",
39
- "@types/react": "^18.0.15",
40
- "@types/react-dom": "^18.0.6",
41
- "@typescript-eslint/eslint-plugin": "^5.30.5",
42
- "@typescript-eslint/parser": "^5.30.5",
43
- "babel-loader": "^8.2.5",
44
- "copyfiles": "^2.4.1",
45
- "cross-env": "^7.0.3",
46
- "css-loader": "^6.7.1",
47
- "css-minimizer-webpack-plugin": "^4.0.0",
48
- "eslint": "^8.19.0",
49
- "eslint-config-airbnb": "^19.0.4",
50
- "eslint-config-prettier": "^8.5.0",
51
- "eslint-plugin-import": "^2.26.0",
52
- "eslint-plugin-jsx-a11y": "^6.6.0",
53
- "eslint-plugin-node": "^11.1.0",
54
- "eslint-plugin-prettier": "^4.2.1",
55
- "eslint-plugin-react": "^7.30.1",
56
- "eslint-plugin-react-hooks": "^4.6.0",
57
- "file-loader": "^6.2.0",
58
- "fork-ts-checker-webpack-plugin": "^7.2.12",
59
- "html-loader": "^3.1.2",
60
- "html-webpack-plugin": "^5.5.0",
61
- "husky": "^8.0.1",
62
- "lint-staged": "^13.0.3",
63
- "mini-css-extract-plugin": "^2.6.1",
64
- "prettier": "^2.7.1",
65
- "rimraf": "^6.0.1",
66
- "sass": "^1.53.0",
67
- "sass-loader": "^13.0.2",
68
- "style-loader": "^3.3.1",
69
- "terser-webpack-plugin": "^5.3.3",
70
- "tsc-alias": "^1.6.11",
71
- "typescript": "^4.7.4",
72
- "webpack": "^5.73.0",
73
- "webpack-cli": "^4.10.0",
74
- "webpack-dev-server": "^4.9.3",
75
- "webpack-merge": "^5.8.0"
76
- },
77
- "dependencies": {
78
- "@fingerprintjs/fingerprintjs": "^3.4.1",
79
- "axios": "^1.4.0",
80
- "react": ">=18.2.0",
81
- "react-dom": ">=18.2.0"
82
- },
83
- "peerDependencies": {
84
- "@types/react": ">=18.0.15",
85
- "@types/react-dom": ">=18.0.6",
86
- "react": ">=18.2.0",
87
- "react-dom": ">=18.2.0"
88
- },
89
- "lint-staged": {
90
- "src/**/*.{ts,tsx,json,js,jsx}": [
91
- "yarn run prettier:fix",
92
- "yarn run lint",
93
- "git add ."
94
- ]
95
- },
96
- "browserslist": {
97
- "production": [
98
- ">0.2%",
99
- "not dead",
100
- "not op_mini all"
101
- ],
102
- "development": [
103
- "last 1 chrome version",
104
- "last 1 firefox version",
105
- "last 1 safari version"
106
- ]
107
- }
108
- }
1
+ {
2
+ "name": "@tap-payments/connect",
3
+ "version": "2.10.8-beta",
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
+ "prepare": "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 --tag beta"
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/axios": "^0.14.0",
37
+ "@types/crypto-js": "^4.1.1",
38
+ "@types/react": "^18.0.15",
39
+ "@types/react-dom": "^18.0.6",
40
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
41
+ "@typescript-eslint/parser": "^5.30.5",
42
+ "babel-loader": "^8.2.5",
43
+ "copyfiles": "^2.4.1",
44
+ "cross-env": "^7.0.3",
45
+ "css-loader": "^6.7.1",
46
+ "css-minimizer-webpack-plugin": "^4.0.0",
47
+ "eslint": "^8.19.0",
48
+ "eslint-config-airbnb": "^19.0.4",
49
+ "eslint-config-prettier": "^8.5.0",
50
+ "eslint-plugin-import": "^2.26.0",
51
+ "eslint-plugin-jsx-a11y": "^6.6.0",
52
+ "eslint-plugin-node": "^11.1.0",
53
+ "eslint-plugin-prettier": "^4.2.1",
54
+ "eslint-plugin-react": "^7.30.1",
55
+ "eslint-plugin-react-hooks": "^4.6.0",
56
+ "file-loader": "^6.2.0",
57
+ "fork-ts-checker-webpack-plugin": "^7.2.12",
58
+ "html-loader": "^3.1.2",
59
+ "html-webpack-plugin": "^5.5.0",
60
+ "husky": "^8.0.1",
61
+ "lint-staged": "^13.0.3",
62
+ "mini-css-extract-plugin": "^2.6.1",
63
+ "prettier": "^2.7.1",
64
+ "sass": "^1.53.0",
65
+ "sass-loader": "^13.0.2",
66
+ "style-loader": "^3.3.1",
67
+ "terser-webpack-plugin": "^5.3.3",
68
+ "tsc-alias": "^1.6.11",
69
+ "typescript": "^4.7.4",
70
+ "webpack": "^5.73.0",
71
+ "webpack-cli": "^4.10.0",
72
+ "webpack-dev-server": "^4.9.3",
73
+ "webpack-merge": "^5.8.0"
74
+ },
75
+ "dependencies": {
76
+ "@fingerprintjs/fingerprintjs": "^3.4.1",
77
+ "axios": "^1.4.0",
78
+ "react": ">=18.2.0",
79
+ "react-dom": ">=18.2.0"
80
+ },
81
+ "peerDependencies": {
82
+ "@types/react": ">=18.0.15",
83
+ "@types/react-dom": ">=18.0.6",
84
+ "react": ">=18.2.0",
85
+ "react-dom": ">=18.2.0"
86
+ },
87
+ "lint-staged": {
88
+ "src/**/*.{ts,tsx,json,js,jsx}": [
89
+ "yarn run prettier:fix",
90
+ "yarn run lint",
91
+ "git add ."
92
+ ]
93
+ },
94
+ "browserslist": {
95
+ "production": [
96
+ ">0.2%",
97
+ "not dead",
98
+ "not op_mini all"
99
+ ],
100
+ "development": [
101
+ "last 1 chrome version",
102
+ "last 1 firefox version",
103
+ "last 1 safari version"
104
+ ]
105
+ }
106
+ }