@tap-payments/auth-jsconnect 2.0.3 → 2.0.4

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 (76) hide show
  1. package/build/@types/app.d.ts +5 -0
  2. package/build/@types/form.d.ts +2 -1
  3. package/build/api/auth.d.ts +20 -3
  4. package/build/api/axios.js +8 -9
  5. package/build/api/data.d.ts +1 -0
  6. package/build/api/data.js +9 -2
  7. package/build/api/entity.d.ts +5 -1
  8. package/build/api/entity.js +11 -2
  9. package/build/api/index.d.ts +6 -4
  10. package/build/api/lead.d.ts +2 -1
  11. package/build/api/lead.js +14 -2
  12. package/build/components/AnimationFlow/AnimationFlow.d.ts +2 -1
  13. package/build/components/AnimationFlow/AnimationFlow.js +2 -2
  14. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  15. package/build/components/AnimationFlow/BottomSheet.js +16 -4
  16. package/build/constants/api.d.ts +2 -1
  17. package/build/constants/api.js +5 -3
  18. package/build/constants/app.d.ts +5 -0
  19. package/build/constants/app.js +21 -5
  20. package/build/features/app/bank/bankStore.js +17 -10
  21. package/build/features/app/business/businessStore.d.ts +3 -5
  22. package/build/features/app/business/businessStore.js +140 -48
  23. package/build/features/app/connect/connectStore.d.ts +5 -10
  24. package/build/features/app/connect/connectStore.js +117 -25
  25. package/build/features/app/individual/individualStore.d.ts +3 -2
  26. package/build/features/app/individual/individualStore.js +42 -30
  27. package/build/features/app/password/passwordStore.d.ts +29 -1
  28. package/build/features/app/password/passwordStore.js +194 -14
  29. package/build/features/app/tax/taxStore.js +19 -12
  30. package/build/features/bank/Bank.js +3 -4
  31. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -4
  32. package/build/features/business/Business.js +3 -4
  33. package/build/features/business/screens/Activities/Activities.js +1 -1
  34. package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
  35. package/build/features/business/screens/OTP/OTPInput.js +3 -9
  36. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +17 -6
  37. package/build/features/connect/Connect.js +1 -1
  38. package/build/features/connect/screens/Mobile/Mobile.js +2 -2
  39. package/build/features/connect/screens/Mobile/MobileNumber.js +1 -1
  40. package/build/features/connect/screens/NID/IDNumber.js +1 -1
  41. package/build/features/connect/screens/NID/NID.js +2 -2
  42. package/build/features/connect/screens/OTP/OTPInput.js +3 -13
  43. package/build/features/featuresScreens.js +5 -0
  44. package/build/features/individual/Individual.js +3 -4
  45. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +7 -1
  46. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +10 -0
  47. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +89 -0
  48. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +3 -0
  49. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -0
  50. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -4
  51. package/build/features/password/Password.js +11 -6
  52. package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -2
  53. package/build/features/password/screens/OTP/OTP.d.ts +8 -0
  54. package/build/features/password/screens/OTP/OTP.js +78 -0
  55. package/build/features/password/screens/OTP/OTPInput.d.ts +5 -0
  56. package/build/features/password/screens/OTP/OTPInput.js +46 -0
  57. package/build/features/password/screens/OTP/index.d.ts +3 -0
  58. package/build/features/password/screens/OTP/index.js +2 -0
  59. package/build/features/password/screens/OTP/validation.d.ts +8 -0
  60. package/build/features/password/screens/OTP/validation.js +4 -0
  61. package/build/features/password/screens/Success/Success.js +8 -2
  62. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +17 -5
  63. package/build/features/password/screens/Verify/OTPInput.d.ts +2 -2
  64. package/build/features/password/screens/Verify/OTPInput.js +1 -1
  65. package/build/features/shared/Button/FlowsButtons.d.ts +8 -2
  66. package/build/features/shared/Button/FlowsButtons.js +92 -5
  67. package/build/features/shared/Button/SuccessButton.js +17 -13
  68. package/build/features/tax/Tax.js +3 -4
  69. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -4
  70. package/build/hooks/useAppTheme.js +3 -2
  71. package/build/index.css +4 -0
  72. package/build/theme/theme.d.ts +1 -1
  73. package/build/theme/theme.js +1 -2
  74. package/build/utils/string.d.ts +1 -0
  75. package/build/utils/string.js +4 -0
  76. package/package.json +127 -127
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { LanguageMode, DirectionMode } from '../@types';
3
3
  import { settingsSelector } from '../app/settings';
4
+ import { isMobile } from 'react-device-detect';
4
5
  import { useAppSelector } from './useAppSelector';
5
6
  import { appTheme } from '../theme';
6
7
  export var useAppTheme = function () {
@@ -8,7 +9,7 @@ export var useAppTheme = function () {
8
9
  var data = useAppSelector(settingsSelector).data;
9
10
  useEffect(function () {
10
11
  var dir = data.language === LanguageMode.AR ? DirectionMode.RTL : DirectionMode.LTR;
11
- setTheme(appTheme(data.skin, dir));
12
- }, [data.skin, data.language]);
12
+ setTheme(appTheme(data.skin, isMobile, dir));
13
+ }, [data.skin, data.language, isMobile]);
13
14
  return { theme: theme };
14
15
  };
package/build/index.css CHANGED
@@ -133,3 +133,7 @@ table {
133
133
  border-collapse: collapse;
134
134
  border-spacing: 0;
135
135
  }
136
+
137
+ * {
138
+ box-sizing: border-box;
139
+ }
@@ -1,2 +1,2 @@
1
1
  import { DirectionMode, ThemeMode } from '../@types';
2
- export declare const appTheme: (mode: ThemeMode, dir: DirectionMode) => import("@mui/material/styles").Theme;
2
+ export declare const appTheme: (mode: ThemeMode, isMobile: boolean, dir: DirectionMode) => import("@mui/material/styles").Theme;
@@ -3,8 +3,7 @@ import { typography } from './typography';
3
3
  import { darkPalette, lightPalette } from './palette';
4
4
  import { components } from './components';
5
5
  import { shadows } from './shadows';
6
- import { isMobile } from 'react-device-detect';
7
- export var appTheme = function (mode, dir) {
6
+ export var appTheme = function (mode, isMobile, dir) {
8
7
  return createTheme({
9
8
  palette: mode === 'dark' ? darkPalette : lightPalette,
10
9
  direction: dir,
@@ -11,6 +11,7 @@ export declare const convertNumbers2English: (str: string) => string;
11
11
  export declare const getParameterByName: (name: string) => string | null;
12
12
  export declare const getClientEmailUrl: () => string;
13
13
  export declare const getFlowUrl: (path: string, lang: string) => string;
14
+ export declare const getResetFlowUrl: (path: string, lang: string, operationType: string, leadId: string) => string;
14
15
  export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
15
16
  export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
16
17
  al: string;
@@ -62,6 +62,10 @@ export var getFlowUrl = function (path, lang) {
62
62
  var origin = window.location.origin;
63
63
  return origin + path + "?lang=".concat(lang, "&token=");
64
64
  };
65
+ export var getResetFlowUrl = function (path, lang, operationType, leadId) {
66
+ var origin = window.location.origin;
67
+ return origin + path + "?lang=".concat(lang, "&operation_type=").concat(operationType, "&lead_id=").concat(leadId, "&token=");
68
+ };
65
69
  export var capitalizeTheFirstLetterOfEachWord = function (words) {
66
70
  var separateWord = words.toLowerCase().split(' ');
67
71
  for (var i = 0; i < separateWord.length; i++) {
package/package.json CHANGED
@@ -1,127 +1,127 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.3",
4
- "description": "connect library, auth",
5
- "private": false,
6
- "main": "build/index.js",
7
- "module": "build/index.js",
8
- "types": "build/index.d.ts",
9
- "files": [
10
- "build",
11
- "README.md"
12
- ],
13
- "scripts": {
14
- "husky:setup": "npx husky install",
15
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
16
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
17
- "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
18
- "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
19
- "start": "cross-env NODE_ENV=development webpack serve",
20
- "build": "rm -rf build && cross-env NODE_ENV=production webpack",
21
- "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
- "tsc:alias": "tsc-alias -p tsconfig.json",
23
- "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public"
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/lodash-es": "^4.17.6",
38
- "@types/moment-hijri": "^2.1.0",
39
- "@types/react": "^18.0.15",
40
- "@types/react-calendar": "~3.5.1",
41
- "@types/react-dom": "^18.0.6",
42
- "@typescript-eslint/eslint-plugin": "^5.30.5",
43
- "@typescript-eslint/parser": "^5.30.5",
44
- "babel-loader": "^8.2.5",
45
- "copyfiles": "^2.4.1",
46
- "cross-env": "^7.0.3",
47
- "css-loader": "^6.7.1",
48
- "css-minimizer-webpack-plugin": "^4.0.0",
49
- "eslint": "^8.19.0",
50
- "eslint-config-airbnb": "^19.0.4",
51
- "eslint-config-prettier": "^8.5.0",
52
- "eslint-plugin-import": "^2.26.0",
53
- "eslint-plugin-jsx-a11y": "^6.6.0",
54
- "eslint-plugin-node": "^11.1.0",
55
- "eslint-plugin-prettier": "^4.2.1",
56
- "eslint-plugin-react": "^7.30.1",
57
- "eslint-plugin-react-hooks": "^4.6.0",
58
- "file-loader": "^6.2.0",
59
- "fork-ts-checker-webpack-plugin": "^7.2.12",
60
- "html-loader": "^3.1.2",
61
- "html-webpack-plugin": "^5.5.0",
62
- "husky": "^8.0.1",
63
- "lint-staged": "^13.0.3",
64
- "mini-css-extract-plugin": "^2.6.1",
65
- "prettier": "^2.7.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
- "@emotion/react": "^11.9.3",
79
- "@emotion/styled": "^11.9.3",
80
- "@fingerprintjs/fingerprintjs": "~3.3.4",
81
- "@hookform/resolvers": "^2.9.6",
82
- "@mui/icons-material": "^5.8.4",
83
- "@mui/material": "^5.8.7",
84
- "@reduxjs/toolkit": "^1.8.3",
85
- "axios": "^0.27.2",
86
- "device-detector-js": "^3.0.3",
87
- "i18next": "^21.8.14",
88
- "i18next-browser-languagedetector": "^6.1.4",
89
- "i18next-http-backend": "^1.4.1",
90
- "jsencrypt": "^3.2.1",
91
- "lodash-es": "^4.17.21",
92
- "moment-hijri": "~2.1.2",
93
- "react": "^18.2.0",
94
- "react-calendar": "~3.7.0",
95
- "react-device-detect": "^2.2.2",
96
- "react-dom": "^18.2.0",
97
- "react-hook-form": "^7.33.1",
98
- "react-i18next": "^11.18.1",
99
- "react-otp-input": "^2.4.0",
100
- "react-redux": "^8.0.2",
101
- "react-spring-bottom-sheet": "^3.4.1",
102
- "yup": "^0.32.11"
103
- },
104
- "peerDependencies": {
105
- "react": "^18.2.0",
106
- "react-dom": "^18.2.0"
107
- },
108
- "lint-staged": {
109
- "src/**/*.{ts,tsx,json,js,jsx}": [
110
- "yarn run prettier:fix",
111
- "yarn run lint",
112
- "git add ."
113
- ]
114
- },
115
- "browserslist": {
116
- "production": [
117
- ">0.2%",
118
- "not dead",
119
- "not op_mini all"
120
- ],
121
- "development": [
122
- "last 1 chrome version",
123
- "last 1 firefox version",
124
- "last 1 safari version"
125
- ]
126
- }
127
- }
1
+ {
2
+ "name": "@tap-payments/auth-jsconnect",
3
+ "version": "2.0.4",
4
+ "description": "connect library, auth",
5
+ "private": false,
6
+ "main": "build/index.js",
7
+ "module": "build/index.js",
8
+ "types": "build/index.d.ts",
9
+ "files": [
10
+ "build",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "husky:setup": "npx husky install",
15
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
16
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
17
+ "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
18
+ "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
19
+ "start": "cross-env NODE_ENV=development webpack serve",
20
+ "build": "rm -rf build && cross-env NODE_ENV=production webpack",
21
+ "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
+ "tsc:alias": "tsc-alias -p tsconfig.json",
23
+ "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
+ "push": "npm publish --access public"
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/lodash-es": "^4.17.6",
38
+ "@types/moment-hijri": "^2.1.0",
39
+ "@types/react": "^18.0.15",
40
+ "@types/react-calendar": "~3.5.1",
41
+ "@types/react-dom": "^18.0.6",
42
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
43
+ "@typescript-eslint/parser": "^5.30.5",
44
+ "babel-loader": "^8.2.5",
45
+ "copyfiles": "^2.4.1",
46
+ "cross-env": "^7.0.3",
47
+ "css-loader": "^6.7.1",
48
+ "css-minimizer-webpack-plugin": "^4.0.0",
49
+ "eslint": "^8.19.0",
50
+ "eslint-config-airbnb": "^19.0.4",
51
+ "eslint-config-prettier": "^8.5.0",
52
+ "eslint-plugin-import": "^2.26.0",
53
+ "eslint-plugin-jsx-a11y": "^6.6.0",
54
+ "eslint-plugin-node": "^11.1.0",
55
+ "eslint-plugin-prettier": "^4.2.1",
56
+ "eslint-plugin-react": "^7.30.1",
57
+ "eslint-plugin-react-hooks": "^4.6.0",
58
+ "file-loader": "^6.2.0",
59
+ "fork-ts-checker-webpack-plugin": "^7.2.12",
60
+ "html-loader": "^3.1.2",
61
+ "html-webpack-plugin": "^5.5.0",
62
+ "husky": "^8.0.1",
63
+ "lint-staged": "^13.0.3",
64
+ "mini-css-extract-plugin": "^2.6.1",
65
+ "prettier": "^2.7.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
+ "@emotion/react": "^11.9.3",
79
+ "@emotion/styled": "^11.9.3",
80
+ "@fingerprintjs/fingerprintjs": "~3.3.4",
81
+ "@hookform/resolvers": "^2.9.6",
82
+ "@mui/icons-material": "^5.8.4",
83
+ "@mui/material": "^5.8.7",
84
+ "@reduxjs/toolkit": "^1.8.3",
85
+ "axios": "^0.27.2",
86
+ "device-detector-js": "^3.0.3",
87
+ "i18next": "^21.8.14",
88
+ "i18next-browser-languagedetector": "^6.1.4",
89
+ "i18next-http-backend": "^1.4.1",
90
+ "jsencrypt": "^3.2.1",
91
+ "lodash-es": "^4.17.21",
92
+ "moment-hijri": "~2.1.2",
93
+ "react": "^18.2.0",
94
+ "react-calendar": "~3.7.0",
95
+ "react-device-detect": "^2.2.2",
96
+ "react-dom": "^18.2.0",
97
+ "react-hook-form": "^7.33.1",
98
+ "react-i18next": "^11.18.1",
99
+ "react-otp-input": "^2.4.0",
100
+ "react-redux": "^8.0.2",
101
+ "react-spring-bottom-sheet": "^3.4.1",
102
+ "yup": "^0.32.11"
103
+ },
104
+ "peerDependencies": {
105
+ "react": "^18.2.0",
106
+ "react-dom": "^18.2.0"
107
+ },
108
+ "lint-staged": {
109
+ "src/**/*.{ts,tsx,json,js,jsx}": [
110
+ "yarn run prettier:fix",
111
+ "yarn run lint",
112
+ "git add ."
113
+ ]
114
+ },
115
+ "browserslist": {
116
+ "production": [
117
+ ">0.2%",
118
+ "not dead",
119
+ "not op_mini all"
120
+ ],
121
+ "development": [
122
+ "last 1 chrome version",
123
+ "last 1 firefox version",
124
+ "last 1 safari version"
125
+ ]
126
+ }
127
+ }