@tap-payments/auth-jsconnect 2.0.25 → 2.0.26

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.
@@ -63,7 +63,7 @@ import { FlowsTypes, AuthForType } from '../../../@types';
63
63
  import API from '../../../api';
64
64
  import { CONNECT_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_BRAND } from '../../../constants';
65
65
  import { defaultCountry } from '../../../constants';
66
- import { getIndividualName, capitalizeTheFirstLetterOfEachWord, getEighteenYearsAgo, sleep, findCountryByIddPrefix, concatenateObjectValues } from '../../../utils';
66
+ import { getIndividualName, capitalizeTheFirstLetterOfEachWord, getEighteenYearsAgo, sleep, findCountryByIddPrefix, concatenateObjectValues, isTwitter, isWebsite } from '../../../utils';
67
67
  export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
68
68
  var settings, requestBody, data;
69
69
  var _a, _b;
@@ -425,7 +425,7 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
425
425
  });
426
426
  }); });
427
427
  export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
428
- var _a, settings, connect, responseBody, isNewBrand, brandName, salesChannels, selectedBrandItem, isTwitterChannel, isWebsiteChannel, getAddress, channel_services, brandReqBody_1, brand_1, brandNameBody, payload, lead, brandReqBody, brand;
428
+ var _a, settings, connect, responseBody, isNewBrand, brandName, salesChannels, selectedBrandItem, getAddress, channel_services, brandReqBody_1, brand_1, brandNameBody, payload, lead, brandReqBody, brand;
429
429
  var _b, _c, _d, _e, _f;
430
430
  return __generator(this, function (_g) {
431
431
  switch (_g.label) {
@@ -433,8 +433,6 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
433
433
  _a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
434
434
  responseBody = connect.data.otpData.responseBody;
435
435
  isNewBrand = params.isNewBrand, brandName = params.brandName, salesChannels = params.salesChannels, selectedBrandItem = params.selectedBrandItem;
436
- isTwitterChannel = function (value) { return value === 'twitter'; };
437
- isWebsiteChannel = function (value) { return value === 'website'; };
438
436
  getAddress = function (value, isTwitter, isWeb) {
439
437
  if (isTwitter)
440
438
  return '@' + value;
@@ -444,15 +442,11 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
444
442
  };
445
443
  channel_services = salesChannels.map(function (channel) {
446
444
  var _a;
447
- var isTwitter = isTwitterChannel(channel.code);
448
- var isWebsite = isWebsiteChannel(channel.code);
449
445
  return {
450
446
  id: channel.id,
451
- address: getAddress(channel.address || '', isTwitter, isWebsite),
447
+ address: getAddress(channel.address || '', isTwitter(channel.code), isWebsite(channel.code)),
452
448
  sub: (_a = channel.sub) === null || _a === void 0 ? void 0 : _a.map(function (sub) {
453
- var isSubTwitter = isTwitterChannel(sub.code);
454
- var isSubWebsite = isWebsiteChannel(sub.code);
455
- return { id: sub.id, address: getAddress(sub.address || '', isSubTwitter, isSubWebsite) };
449
+ return { id: sub.id, address: getAddress(sub.address || '', isTwitter(sub.code), isWebsite(sub.code)) };
456
450
  })
457
451
  };
458
452
  });
@@ -34,6 +34,7 @@ import SimpleList from '../../../../components/SimpleList';
34
34
  import Text from '../../../../components/Text';
35
35
  import ExpandIcon from '../../../../components/ExpandIcon';
36
36
  import Collapse from '../../../../components/Collapse';
37
+ import { mapSalesChannel } from '../../../../utils';
37
38
  var InputStyled = styled(Input)(function () { return ({
38
39
  '& .MuiInputBase-input': {
39
40
  cursor: 'pointer'
@@ -76,8 +77,9 @@ var BrandList = function (_a) {
76
77
  };
77
78
  var onSelectItem = function (brand) {
78
79
  selectedBrandControl.field.onChange(brand);
79
- if (!isOtherBrand(brand))
80
- setValue('salesChannels', brand.channel_services || [], { shouldValidate: true });
80
+ if (!isOtherBrand(brand)) {
81
+ setValue('salesChannels', mapSalesChannel(brand.channel_services || []), { shouldValidate: true });
82
+ }
81
83
  if (isOtherBrand(brand)) {
82
84
  setValue('salesChannels', [], { shouldValidate: true });
83
85
  setValue('brandName', '');
@@ -23,7 +23,7 @@ import Button from '../../../shared/Button';
23
23
  import { clearError, connectSelector, updateLeadBrand } from '../../../app/connect/connectStore';
24
24
  import { useLanguage } from '../../../../hooks';
25
25
  import { AuthForType } from '../../../../@types';
26
- import { isKW } from '../../../../utils';
26
+ import { isKW, mapSalesChannel } from '../../../../utils';
27
27
  import { MerchantValidationSchema } from './validation';
28
28
  import BrandName from './BrandName';
29
29
  import SocialMedia from './SocialMedia';
@@ -79,12 +79,15 @@ var Merchant = function (_a) {
79
79
  React.useEffect(function () {
80
80
  if (selectedBrandItem.id) {
81
81
  methods.setValue('selectedBrandItem', selectedBrandItem);
82
- methods.setValue('salesChannels', selectedBrandItem.channel_services || [], { shouldValidate: true });
82
+ var sales = mapSalesChannel(selectedBrandItem.channel_services || []);
83
+ methods.setValue('salesChannels', sales, { shouldValidate: true });
83
84
  }
84
85
  }, [selectedBrandItem]);
85
86
  React.useEffect(function () {
86
- if (salesChannels.length > 0)
87
- methods.setValue('salesChannels', salesChannels, { shouldValidate: true });
87
+ if (salesChannels.length > 0) {
88
+ var sales = mapSalesChannel(salesChannels);
89
+ methods.setValue('salesChannels', sales, { shouldValidate: true });
90
+ }
88
91
  }, [salesChannels]);
89
92
  React.useEffect(function () {
90
93
  if (termAndConditionChecked === true)
@@ -32,6 +32,7 @@ import SocialMediaGroup from '../../../../components/SocialMediaGroup';
32
32
  import ToggleButton from '../../../../components/ToggleButton';
33
33
  import Icon from '../../../../components/Icon';
34
34
  import { useLanguage } from '../../../../hooks';
35
+ import { isWebsite, isTwitter } from '../../../../utils';
35
36
  var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
36
37
  var theme = _a.theme, defaultValue = _a.defaultValue;
37
38
  return ({
@@ -168,18 +169,14 @@ var SocialMedia = function (_a) {
168
169
  }) })), selectedChannels.map(function (channel, index) {
169
170
  var _a;
170
171
  var isActive = activeSocialId === channel.id;
171
- var isWebSite = channel.code === 'website';
172
- var isTwitter = channel.code === 'twitter';
173
172
  return ((_a = channel.sub) === null || _a === void 0 ? void 0 : _a.length) ? (channel.sub.map(function (sub, subIndex) {
174
173
  var isSubActive = activeSocialId === sub.id;
175
- var isSubWebSite = sub.code === 'website';
176
- var isSubTwitter = sub.code === 'twitter';
177
174
  return (_jsx(Collapse, __assign({ in: isSubActive, timeout: 300 }, { children: _jsx(InputStyled, { onChange: function (e) {
178
175
  onChangeInput(e.target.value, sub.id);
179
- }, value: sub.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isSubTwitter && { fontSize: '20px' })) }, { children: isSubWebSite ? "https://" : isSubTwitter ? "@" : '' })), placeholder: t(getPlaceHolder(sub)) }) }), "sub_".concat(subIndex)));
176
+ }, value: sub.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(sub.code) && { fontSize: '20px' })) }, { children: isWebsite(sub.code) ? "https://" : isTwitter(sub.code) ? "@" : '' })), placeholder: t(getPlaceHolder(sub)) }) }), "sub_".concat(subIndex)));
180
177
  })) : (_jsx(Collapse, __assign({ in: isActive, timeout: 300 }, { children: _jsx(InputStyled, { onChange: function (e) {
181
178
  onChangeInput(e.target.value, channel.id);
182
- }, value: channel.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter && { fontSize: '20px' })) }, { children: isWebSite ? "https://" : isTwitter ? "@" : '' })), placeholder: t(getPlaceHolder(channel)) }) }), index));
179
+ }, value: channel.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(channel.code) && { fontSize: '20px' })) }, { children: isWebsite(channel.code) ? "https://" : isTwitter(channel.code) ? "@" : '' })), placeholder: t(getPlaceHolder(channel)) }) }), index));
183
180
  }), _jsx(Collapse, __assign({ in: !!hasError }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(linksErrorMsg) })) }))] })) })) }));
184
181
  };
185
182
  export default React.memo(SocialMedia);
@@ -1,4 +1,4 @@
1
- import { CountryCode } from '../@types';
1
+ import { CountryCode, SaleChannel } from '../@types';
2
2
  export declare const isArray: (value: any) => value is any[];
3
3
  export declare const joinArray: (items: Array<any>, joiner?: string) => string;
4
4
  export declare const replaceStringArrayItems: (items: Array<string>, include: string, withThis: string) => string[];
@@ -12,3 +12,14 @@ export declare const allAreTruthy: (items: Array<any>, condition: boolean | stri
12
12
  export declare const sortCountries: (countries: Array<CountryCode>) => CountryCode[];
13
13
  export declare const findCountryByIso2: (countries: Array<CountryCode>, iso2: string) => CountryCode | undefined;
14
14
  export declare const findCountryByIddPrefix: (countries: Array<CountryCode>, iddPrefix: string) => CountryCode | undefined;
15
+ export declare const mapSalesChannel: (salesChannel: Array<SaleChannel>) => {
16
+ sub?: import("../@types").SubSaleChannel[] | undefined;
17
+ address: string;
18
+ id: string;
19
+ code: string;
20
+ name?: {
21
+ ar: string;
22
+ en: string;
23
+ } | undefined;
24
+ logo?: string | undefined;
25
+ }[];
@@ -1,3 +1,14 @@
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
+ };
1
12
  export var isArray = function (value) { return Array.isArray(value); };
2
13
  export var joinArray = function (items, joiner) {
3
14
  if (joiner === void 0) { joiner = '__'; }
@@ -68,3 +79,13 @@ export var findCountryByIddPrefix = function (countries, iddPrefix) {
68
79
  throw new Error('idd_prefix is required');
69
80
  return countries.find(function (country) { return country.idd_prefix.toString() === iddPrefix; });
70
81
  };
82
+ export var mapSalesChannel = function (salesChannel) {
83
+ return salesChannel.map(function (item) {
84
+ var hasSub = item.sub && item.sub.length > 0;
85
+ return __assign(__assign(__assign({}, item), { address: (item.address || '').replaceAll('https://', '').replaceAll('@', '') }), (hasSub && {
86
+ sub: item.sub.map(function (subItem) {
87
+ return __assign(__assign({}, subItem), { address: (subItem.address || '').replaceAll('https://', '').replaceAll('@', '') });
88
+ })
89
+ }));
90
+ });
91
+ };
@@ -44,3 +44,13 @@ export declare const getScreenNameBasedOnFlow: (flow: string) => "CONNECT_NID_ST
44
44
  export declare const getEighteenYearsAgo: () => string;
45
45
  export declare const isKW: (flag: string) => boolean;
46
46
  export declare const isSA: (flag: string) => boolean;
47
+ export declare const isLinkedIn: (flag: string) => boolean;
48
+ export declare const isTwitter: (flag: string) => boolean;
49
+ export declare const isWebsite: (flag: string) => boolean;
50
+ export declare const isIos: (flag: string) => boolean;
51
+ export declare const isAndroid: (flag: string) => boolean;
52
+ export declare const isFacebook: (flag: string) => boolean;
53
+ export declare const isInstagram: (flag: string) => boolean;
54
+ export declare const isPhysicalStore: (flag: string) => boolean;
55
+ export declare const isCallCenter: (flag: string) => boolean;
56
+ export declare const getChannelIcon: (channel: string) => string;
@@ -1,7 +1,7 @@
1
1
  import { FlowsTypes } from '../@types';
2
2
  import { encryptString } from '.';
3
3
  import { removeAxiosGlobalHeaders } from '../api';
4
- import { ENDPOINT_PATHS } from '../constants';
4
+ import { ENDPOINT_PATHS, ICONS_FULL_PATH } from '../constants';
5
5
  import moment from 'moment';
6
6
  export var maskPhone = function (str) {
7
7
  if (str === void 0) { str = ''; }
@@ -179,3 +179,61 @@ export var isKW = function (flag) {
179
179
  export var isSA = function (flag) {
180
180
  return ['sa', 'sau'].includes(flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
181
181
  };
182
+ export var isLinkedIn = function (flag) {
183
+ return 'linkedin' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
184
+ };
185
+ export var isTwitter = function (flag) {
186
+ return 'twitter' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
187
+ };
188
+ export var isWebsite = function (flag) {
189
+ return 'website' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
190
+ };
191
+ export var isIos = function (flag) {
192
+ return 'ios' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
193
+ };
194
+ export var isAndroid = function (flag) {
195
+ return 'android' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
196
+ };
197
+ export var isFacebook = function (flag) {
198
+ return 'facebook' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
199
+ };
200
+ export var isInstagram = function (flag) {
201
+ return 'instagram' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
202
+ };
203
+ export var isPhysicalStore = function (flag) {
204
+ return 'physical_store' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
205
+ };
206
+ export var isCallCenter = function (flag) {
207
+ return 'call_center' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
208
+ };
209
+ export var getChannelIcon = function (channel) {
210
+ var key = channel === null || channel === void 0 ? void 0 : channel.toLowerCase();
211
+ if (isWebsite(key)) {
212
+ return ICONS_FULL_PATH + '/website.svg';
213
+ }
214
+ if (isLinkedIn(key)) {
215
+ return ICONS_FULL_PATH + '/LinkedIn-white.png';
216
+ }
217
+ if (isFacebook(key)) {
218
+ return ICONS_FULL_PATH + '/facebook.svg';
219
+ }
220
+ if (isInstagram(key)) {
221
+ return ICONS_FULL_PATH + '/insta.svg';
222
+ }
223
+ if (isTwitter(key)) {
224
+ return ICONS_FULL_PATH + '/twitter-icon.svg';
225
+ }
226
+ if (isPhysicalStore(key)) {
227
+ return ICONS_FULL_PATH + '/physical-store.svg';
228
+ }
229
+ if (isIos(key)) {
230
+ return ICONS_FULL_PATH + '/apple.svg';
231
+ }
232
+ if (isAndroid(key)) {
233
+ return ICONS_FULL_PATH + '/play-store.svgg';
234
+ }
235
+ if (isCallCenter(key)) {
236
+ return ICONS_FULL_PATH + '/call-center.svg';
237
+ }
238
+ return '';
239
+ };
package/package.json CHANGED
@@ -1,129 +1,129 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.25",
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": "^2.3.1",
91
- "lodash-es": "^4.17.21",
92
- "lottie-web": "^5.9.6",
93
- "moment-hijri": "~2.1.2",
94
- "react": "^18.2.0",
95
- "react-calendar": "~3.7.0",
96
- "react-device-detect": "^2.2.2",
97
- "react-dom": "^18.2.0",
98
- "react-dropzone": "^14.2.2",
99
- "react-hook-form": "^7.33.1",
100
- "react-i18next": "^11.18.1",
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.0.26",
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": "^2.3.1",
91
+ "lodash-es": "^4.17.21",
92
+ "lottie-web": "^5.9.6",
93
+ "moment-hijri": "~2.1.2",
94
+ "react": "^18.2.0",
95
+ "react-calendar": "~3.7.0",
96
+ "react-device-detect": "^2.2.2",
97
+ "react-dom": "^18.2.0",
98
+ "react-dropzone": "^14.2.2",
99
+ "react-hook-form": "^7.33.1",
100
+ "react-i18next": "^11.18.1",
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
+ }