@tap-payments/auth-jsconnect 2.0.66-test → 2.0.68-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.
@@ -38,6 +38,7 @@ export declare type BrandFormValues = {
38
38
  };
39
39
  export declare type BusinessTypeFormValues = {
40
40
  licenseNumber: string;
41
+ entityLegalName?: string;
41
42
  selectedLicense?: License;
42
43
  };
43
44
  export declare type ActivitiesFormValues = {
@@ -42,7 +42,7 @@ export declare type UpdateLeadBody = {
42
42
  name?: Name;
43
43
  contact?: Contact;
44
44
  send_invite?: boolean;
45
- business_name?: BusinessName;
45
+ business?: BusinessName;
46
46
  business_type?: string;
47
47
  country_code?: string;
48
48
  brand?: BrandInfo;
@@ -61,7 +61,7 @@ import API from '../../../api';
61
61
  import { BusinessType, FlowsTypes } from '../../../@types';
62
62
  import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
63
63
  import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW } from '../../../utils';
64
- import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
64
+ import { handleNextScreenStep } from '../../../app/settings';
65
65
  export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
66
  var payload, data, leadResponse, brandInfo, boardResponse, countryIso2, board_id, board_info_id, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
67
67
  var _a, _b, _c, _d, _e, _f, _g;
@@ -83,7 +83,6 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
83
83
  case 2:
84
84
  leadResponse = _h.sent();
85
85
  countryIso2 = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.country_code;
86
- thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
87
86
  board_id = (_b = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _b === void 0 ? void 0 : _b.board_id;
88
87
  board_info_id = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.board_info_id;
89
88
  if (!(!!board_id && !!board_info_id)) return [3, 4];
@@ -437,6 +436,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
437
436
  license_type: ((_c = params.selectedLicense) === null || _c === void 0 ? void 0 : _c.type) === BusinessType.FL ? 'freelance' : 'commercial_registration',
438
437
  business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
439
438
  step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
439
+ business: { ar: params.entityLegalName, en: params.entityLegalName },
440
440
  encryption_contract: ['license_number', 'business_type', 'license_type']
441
441
  };
442
442
  return [4, API.leadService.updateLead(payload)];
@@ -640,12 +640,13 @@ var initialState = {
640
640
  type: ''
641
641
  },
642
642
  businessTypeData: {
643
- licenseNumber: ''
643
+ licenseNumber: '',
644
+ entityLegalName: ''
644
645
  },
645
646
  activitiesData: {
646
647
  activities: [],
647
648
  salesChannels: [],
648
- operationStartDate: '1998-08-22'
649
+ operationStartDate: new Date().toString()
649
650
  },
650
651
  customersData: {
651
652
  customerLocations: [],
@@ -249,7 +249,7 @@ var initialState = {
249
249
  entityData: {
250
250
  activities: [],
251
251
  salesChannels: [],
252
- operationStartDate: '1998-08-22'
252
+ operationStartDate: new Date().toString()
253
253
  }
254
254
  }
255
255
  };
@@ -15,23 +15,25 @@ import { useForm, FormProvider } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
- import { handlePrevScreenStep } from '../../../../app/settings';
18
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
19
19
  import Form from '../../../../components/Form';
20
20
  import Collapse from '../../../../components/Collapse';
21
21
  import { useLanguage } from '../../../../hooks';
22
22
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
23
  import { businessSelector, clearError, updateLeadBusinessType } from '../../../app/business/businessStore';
24
24
  import Button from '../../../shared/Button';
25
- import { LicenseValidationSchema } from './validation';
25
+ import { KWLicenseValidationSchema, LicenseValidationSchema } from './validation';
26
26
  import LicenseList from './LicenseList';
27
+ import { isKW } from '../../../../utils';
27
28
  var BusinessType = function (_a) {
28
29
  var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
30
+ var settingData = useAppSelector(settingsSelector).data;
29
31
  var t = useTranslation().t;
30
32
  var isAr = useLanguage().isAr;
31
33
  var dispatch = useAppDispatch();
32
34
  var _c = React.useState(false), listActive = _c[0], setListActive = _c[1];
33
35
  var methods = useForm({
34
- resolver: yupResolver(LicenseValidationSchema),
36
+ resolver: yupResolver(isKW(settingData.businessCountry.iso2) ? KWLicenseValidationSchema : LicenseValidationSchema),
35
37
  defaultValues: data.businessTypeData,
36
38
  mode: 'onChange'
37
39
  });
@@ -42,7 +44,8 @@ var BusinessType = function (_a) {
42
44
  var onSubmit = function (data) {
43
45
  var dataValues = {
44
46
  selectedLicense: data.selectedLicense,
45
- licenseNumber: data.licenseNumber
47
+ licenseNumber: data.licenseNumber,
48
+ entityLegalName: data.entityLegalName
46
49
  };
47
50
  dispatch(updateLeadBusinessType(dataValues));
48
51
  };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface EntityNameProps {
3
+ show: boolean;
4
+ }
5
+ declare const EntityName: ({ show }: EntityNameProps) => JSX.Element;
6
+ export default EntityName;
@@ -0,0 +1,51 @@
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 ClearIcon from '../../../shared/ClearIcon';
14
+ import CheckIcon from '../../../shared/CheckIcon';
15
+ import Input from '../../../shared/Input';
16
+ import Collapse from '../../../../components/Collapse';
17
+ import { useTranslation } from 'react-i18next';
18
+ import { useController, useFormContext } from 'react-hook-form';
19
+ import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
20
+ import { styled } from '@mui/material/styles';
21
+ import Box from '@mui/material/Box';
22
+ var BoxStyled = styled(Box)(function (_a) {
23
+ var theme = _a.theme;
24
+ return ({
25
+ display: 'flex',
26
+ flexDirection: 'column',
27
+ direction: theme.direction,
28
+ fontFamily: theme.typography.fontFamily,
29
+ overflow: 'hidden',
30
+ paddingBlockEnd: theme.spacing(2.5)
31
+ });
32
+ });
33
+ var EntityName = function (_a) {
34
+ var _b;
35
+ var show = _a.show;
36
+ var t = useTranslation().t;
37
+ var control = useFormContext().control;
38
+ var entityNameControl = useController({ control: control, name: 'entityLegalName' });
39
+ var entityNameValue = entityNameControl.field.value;
40
+ var error = (_b = entityNameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
41
+ var handleChange = function (_a) {
42
+ var target = _a.target;
43
+ var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
44
+ entityNameControl.field.onChange(value);
45
+ };
46
+ var clearEntityName = function () {
47
+ entityNameControl.field.onChange('');
48
+ };
49
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(BoxStyled, { children: _jsx(Input, { label: t('entity_legal_name_title'), onChange: handleChange, value: entityNameValue, endAdornment: (entityNameValue === null || entityNameValue === void 0 ? void 0 : entityNameValue.length) >= 3 ? _jsx(CheckIcon, {}) : entityNameValue && _jsx(ClearIcon, { onClick: clearEntityName }), placeholder: t('entity_legal_name_placeholder'), warningType: 'alert', warningMessage: error && t(error) }) }) })));
50
+ };
51
+ export default EntityName;
@@ -37,6 +37,9 @@ import Text from '../../../../components/Text';
37
37
  import ExpandIcon from '../../../../components/ExpandIcon';
38
38
  import Collapse from '../../../../components/Collapse';
39
39
  import LicenseNumber from './LicenseNumber';
40
+ import EntityName from '../../../../features/business/screens/BusinessType/EntityName';
41
+ import { isKW } from '../../../../utils';
42
+ import { settingsSelector } from '../../../../app/settings';
40
43
  var InputStyled = styled(Input)(function (_a) {
41
44
  var theme = _a.theme;
42
45
  return ({
@@ -54,14 +57,16 @@ var LicenseNameText = styled(Text, { shouldForwardProp: function (prop) { return
54
57
  return (__assign(__assign({ display: 'flex', color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
55
58
  });
56
59
  var LicenseList = function (_a) {
60
+ var _b;
57
61
  var rest = __rest(_a, []);
58
- var _b = useAppSelector(businessSelector), data = _b.data, error = _b.error;
62
+ var _c = useAppSelector(businessSelector), data = _c.data, error = _c.error;
63
+ var settingData = useAppSelector(settingsSelector).data;
59
64
  var businessTypeData = data.businessTypeData;
60
- var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
65
+ var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
61
66
  var t = useTranslation().t;
62
67
  var isAr = useLanguage().isAr;
63
68
  var dispatch = useAppDispatch();
64
- var _d = useFormContext(), setValue = _d.setValue, control = _d.control;
69
+ var _e = useFormContext(), setValue = _e.setValue, control = _e.control;
65
70
  var selectedLicenseControl = useController({ control: control, name: 'selectedLicense' });
66
71
  var responseBody = businessTypeData.responseBody, selectedLicense = businessTypeData.selectedLicense, licenseNumber = businessTypeData.licenseNumber;
67
72
  var licenseList = (responseBody || { licenseList: [] }).licenseList;
@@ -123,6 +128,6 @@ var LicenseList = function (_a) {
123
128
  var flValue = isOtherLicense(selected) ? t(getLicenseName(selected)) : getLicenseNumber(selected);
124
129
  return (_jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_any_license'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_cr'), value: isCR ? t(getLicenseName(selected)) : flValue }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'legal_name?.en', list: licenseList || [], onSelectItem: onSelectItem, renderItem: function (item) {
125
130
  return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selected) }, { children: isOtherLicense(item) ? t(getLicenseName(item)) : getLicenseFullName(item) })) }), getLicenseNumber(item) === getLicenseNumber(selected) && _jsx(CheckIcon, {})] }));
126
- } }) })), _jsx(LicenseNumber, { show: showLicenseNumber, readOnly: licenseReadonly })] }));
131
+ } }) })), _jsx(EntityName, { show: showLicenseNumber && isKW((_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.country_code) }), _jsx(LicenseNumber, { show: showLicenseNumber, readOnly: licenseReadonly })] }));
127
132
  };
128
133
  export default React.memo(LicenseList);
@@ -1,11 +1,24 @@
1
1
  import * as yup from 'yup';
2
2
  export declare const LicenseValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ selectedLicense: any;
4
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
5
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
+ selectedLicense: any;
7
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
8
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
+ selectedLicense: any;
10
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
11
+ }>>>;
12
+ export declare const KWLicenseValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
13
  selectedLicense: any;
4
14
  licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
15
+ entityLegalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
5
16
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
17
  selectedLicense: any;
7
18
  licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
19
+ entityLegalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
20
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
21
  selectedLicense: any;
10
22
  licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
23
+ entityLegalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
24
  }>>>;
@@ -1,5 +1,5 @@
1
1
  import * as yup from 'yup';
2
- import { FL_NUMBER_LENGTH, CR_NUMBER_LENGTH } from '../../../../constants';
2
+ import { FL_NUMBER_LENGTH, CR_NUMBER_LENGTH, REGEX_BRAND_NAME } from '../../../../constants';
3
3
  import { BusinessType } from '../../../../@types';
4
4
  var objectElements = {
5
5
  legal_name: yup.object().shape({
@@ -12,6 +12,22 @@ var objectElements = {
12
12
  type: yup.string()
13
13
  };
14
14
  export var LicenseValidationSchema = yup.object().shape({
15
+ selectedLicense: yup.object().shape(objectElements).required(''),
16
+ licenseNumber: yup.string().test({
17
+ test: function (value) {
18
+ var selectedLicense = this.parent.selectedLicense;
19
+ var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
20
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
21
+ if (length === 0)
22
+ return true;
23
+ if (isCR) {
24
+ return length === CR_NUMBER_LENGTH ? true : this.createError({ message: 'cr_max_length' });
25
+ }
26
+ return length === FL_NUMBER_LENGTH ? true : this.createError({ message: 'fl_max_length' });
27
+ }
28
+ })
29
+ });
30
+ export var KWLicenseValidationSchema = yup.object().shape({
15
31
  selectedLicense: yup.object().shape(objectElements).required(''),
16
32
  licenseNumber: yup
17
33
  .string()
@@ -27,6 +43,19 @@ export var LicenseValidationSchema = yup.object().shape({
27
43
  }
28
44
  return length === FL_NUMBER_LENGTH ? true : this.createError({ message: 'fl_max_length' });
29
45
  }
46
+ })
47
+ .required(''),
48
+ entityLegalName: yup
49
+ .string()
50
+ .test({
51
+ test: function (value) {
52
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
53
+ if (length === 0)
54
+ return true;
55
+ return !(value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME)) || (value === null || value === void 0 ? void 0 : value.length) < 3
56
+ ? this.createError({ message: 'enter_entity_name_english_chars_numbers_space' })
57
+ : true;
58
+ }
30
59
  })
31
60
  .required('')
32
61
  });
package/package.json CHANGED
@@ -1,129 +1,129 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.66-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/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.68-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/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
+ }