@tap-payments/auth-jsconnect 2.1.16-test → 2.1.20-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.
@@ -26,7 +26,7 @@ var SalesChannels = function (_a) {
26
26
  field.onChange(sales);
27
27
  }
28
28
  }, [defaultSalesChannels]);
29
- var selectedSalesChannels = React.useMemo(function () { return mapSalesChannel(field.value); }, [field.value]);
29
+ var selectedSalesChannels = React.useMemo(function () { return mapSalesChannel(field.value); }, [(field.value || []).length]);
30
30
  var onChange = function (channels) {
31
31
  if (error)
32
32
  dispatch(clearError());
@@ -121,9 +121,10 @@ var SalesChannel = function (_a) {
121
121
  };
122
122
  React.useEffect(function () {
123
123
  if (defaultValues.length >= 0) {
124
- console.log('defaultValues', defaultValues);
125
124
  setSelectedSales(defaultValues);
126
- onChangeActiveSaleIcon(findFirstId(defaultValues));
125
+ var lastItem = defaultValues.at(-1);
126
+ if (lastItem)
127
+ onChangeActiveSaleIcon(findFirstId([lastItem]));
127
128
  }
128
129
  }, [defaultValues]);
129
130
  return (_jsxs(_Fragment, { children: [_jsxs(Box, __assign({ sx: { mb: 3 } }, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), list.map(function (channel, index) {
package/package.json CHANGED
@@ -1,129 +1,129 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.1.16-test",
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/react": "^18.0.15",
39
- "@types/react-calendar": "~3.5.1",
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
- "sass": "^1.53.0",
66
- "sass-loader": "^13.0.2",
67
- "style-loader": "^3.3.1",
68
- "terser-webpack-plugin": "^5.3.3",
69
- "tsc-alias": "^1.6.11",
70
- "typescript": "^4.7.4",
71
- "webpack": "^5.73.0",
72
- "webpack-cli": "^4.10.0",
73
- "webpack-dev-server": "^4.9.3",
74
- "webpack-merge": "^5.8.0"
75
- },
76
- "dependencies": {
77
- "@emotion/react": "^11.9.3",
78
- "@emotion/styled": "^11.9.3",
79
- "@fingerprintjs/fingerprintjs": "~3.3.4",
80
- "@hookform/resolvers": "^2.9.6",
81
- "@mui/icons-material": "^5.8.4",
82
- "@mui/material": "^5.8.7",
83
- "@reduxjs/toolkit": "^1.8.3",
84
- "axios": "^0.27.2",
85
- "device-detector-js": "^3.0.3",
86
- "i18next": "^21.8.14",
87
- "i18next-browser-languagedetector": "^6.1.4",
88
- "i18next-http-backend": "^1.4.1",
89
- "jsencrypt": "^2.3.1",
90
- "lodash-es": "^4.17.21",
91
- "lottie-web": "^5.9.6",
92
- "moment": "^2.29.4",
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-dropzone": "^14.2.2",
98
- "react-hook-form": "^7.33.1",
99
- "react-i18next": "^11.18.1",
100
- "react-multi-date-picker": "^3.3.4",
101
- "react-otp-input": "^2.4.0",
102
- "react-redux": "^8.0.2",
103
- "react-spring-bottom-sheet": "^3.4.1",
104
- "yup": "^0.32.11"
105
- },
106
- "peerDependencies": {
107
- "react": "^18.2.0",
108
- "react-dom": "^18.2.0"
109
- },
110
- "lint-staged": {
111
- "src/**/*.{ts,tsx,json,js,jsx}": [
112
- "yarn run prettier:fix",
113
- "yarn run lint",
114
- "git add ."
115
- ]
116
- },
117
- "browserslist": {
118
- "production": [
119
- ">0.2%",
120
- "not dead",
121
- "not op_mini all"
122
- ],
123
- "development": [
124
- "last 1 chrome version",
125
- "last 1 firefox version",
126
- "last 1 safari version"
127
- ]
128
- }
129
- }
1
+ {
2
+ "name": "@tap-payments/auth-jsconnect",
3
+ "version": "2.1.20-test",
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/react": "^18.0.15",
39
+ "@types/react-calendar": "~3.5.1",
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
+ "sass": "^1.53.0",
66
+ "sass-loader": "^13.0.2",
67
+ "style-loader": "^3.3.1",
68
+ "terser-webpack-plugin": "^5.3.3",
69
+ "tsc-alias": "^1.6.11",
70
+ "typescript": "^4.7.4",
71
+ "webpack": "^5.73.0",
72
+ "webpack-cli": "^4.10.0",
73
+ "webpack-dev-server": "^4.9.3",
74
+ "webpack-merge": "^5.8.0"
75
+ },
76
+ "dependencies": {
77
+ "@emotion/react": "^11.9.3",
78
+ "@emotion/styled": "^11.9.3",
79
+ "@fingerprintjs/fingerprintjs": "~3.3.4",
80
+ "@hookform/resolvers": "^2.9.6",
81
+ "@mui/icons-material": "^5.8.4",
82
+ "@mui/material": "^5.8.7",
83
+ "@reduxjs/toolkit": "^1.8.3",
84
+ "axios": "^0.27.2",
85
+ "device-detector-js": "^3.0.3",
86
+ "i18next": "^21.8.14",
87
+ "i18next-browser-languagedetector": "^6.1.4",
88
+ "i18next-http-backend": "^1.4.1",
89
+ "jsencrypt": "^2.3.1",
90
+ "lodash-es": "^4.17.21",
91
+ "lottie-web": "^5.9.6",
92
+ "moment": "^2.29.4",
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-dropzone": "^14.2.2",
98
+ "react-hook-form": "^7.33.1",
99
+ "react-i18next": "^11.18.1",
100
+ "react-multi-date-picker": "^3.3.4",
101
+ "react-otp-input": "^2.4.0",
102
+ "react-redux": "^8.0.2",
103
+ "react-spring-bottom-sheet": "^3.4.1",
104
+ "yup": "^0.32.11"
105
+ },
106
+ "peerDependencies": {
107
+ "react": "^18.2.0",
108
+ "react-dom": "^18.2.0"
109
+ },
110
+ "lint-staged": {
111
+ "src/**/*.{ts,tsx,json,js,jsx}": [
112
+ "yarn run prettier:fix",
113
+ "yarn run lint",
114
+ "git add ."
115
+ ]
116
+ },
117
+ "browserslist": {
118
+ "production": [
119
+ ">0.2%",
120
+ "not dead",
121
+ "not op_mini all"
122
+ ],
123
+ "development": [
124
+ "last 1 chrome version",
125
+ "last 1 firefox version",
126
+ "last 1 safari version"
127
+ ]
128
+ }
129
+ }