@tap-payments/auth-jsconnect 1.0.100-test → 1.1.0-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.
Files changed (31) hide show
  1. package/build/@types/form.d.ts +2 -0
  2. package/build/api/entity.d.ts +7 -0
  3. package/build/api/entity.js +10 -1
  4. package/build/api/index.d.ts +1 -0
  5. package/build/components/FileInput/DragAndDrop.d.ts +7 -0
  6. package/build/components/FileInput/DragAndDrop.js +39 -0
  7. package/build/components/FileInput/UploadInput.d.ts +7 -0
  8. package/build/components/FileInput/UploadInput.js +38 -0
  9. package/build/components/FileInput/index.d.ts +3 -0
  10. package/build/components/FileInput/index.js +3 -0
  11. package/build/constants/api.d.ts +1 -0
  12. package/build/constants/api.js +3 -1
  13. package/build/constants/assets.d.ts +1 -0
  14. package/build/constants/assets.js +1 -0
  15. package/build/constants/validation.d.ts +1 -0
  16. package/build/constants/validation.js +1 -0
  17. package/build/features/app/bank/bankStore.d.ts +1 -0
  18. package/build/features/app/bank/bankStore.js +37 -2
  19. package/build/features/app/password/passwordStore.d.ts +4 -1
  20. package/build/features/app/password/passwordStore.js +20 -17
  21. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -1
  22. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +3 -0
  23. package/build/features/bank/screens/BankDetails/BankStatement.js +38 -0
  24. package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
  25. package/build/features/bank/screens/BankDetails/validation.js +1 -0
  26. package/build/features/password/screens/Success/Success.js +2 -2
  27. package/build/features/shared/UploadFile/UploadFile.d.ts +21 -0
  28. package/build/features/shared/UploadFile/UploadFile.js +77 -0
  29. package/build/features/shared/UploadFile/index.d.ts +2 -0
  30. package/build/features/shared/UploadFile/index.js +2 -0
  31. package/package.json +128 -127
@@ -49,6 +49,8 @@ export declare type BankFormValues = {
49
49
  iban: string;
50
50
  beneficiaryName: string;
51
51
  bankName: string;
52
+ bankStatementId: string;
53
+ uploading?: boolean;
52
54
  confirmPolicy: boolean;
53
55
  };
54
56
  export declare type TaxFormValues = {
@@ -37,11 +37,18 @@ export declare type EntityBankUpdateBody = {
37
37
  step_name: string;
38
38
  encryption_contract?: Array<string>;
39
39
  };
40
+ export declare type UploadFileBody = {
41
+ file_link_create: boolean;
42
+ file: File | null;
43
+ title: string | undefined;
44
+ purpose: string;
45
+ };
40
46
  declare const entityService: {
41
47
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
42
48
  updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
43
49
  createBankAccount: (data: EntityBankUpdateBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
44
50
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
45
51
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
52
+ uploadFileInfo: (data: UploadFileBody) => Promise<any>;
46
53
  };
47
54
  export { entityService };
@@ -25,6 +25,14 @@ var updateEntityInfo = function (_a, config) {
25
25
  var createBankAccount = function (data, config) {
26
26
  return instance.post("".concat(ENDPOINT_PATHS.BANK), data, config);
27
27
  };
28
+ var uploadFileInfo = function (data) {
29
+ return httpClient({
30
+ method: 'post',
31
+ url: "".concat(ENDPOINT_PATHS.FILES_PATH),
32
+ data: data,
33
+ headers: { 'Content-Type': 'multipart/form-data' }
34
+ });
35
+ };
28
36
  var updateIndividualInfo = function (_a) {
29
37
  var id = _a.id, data = __rest(_a, ["id"]);
30
38
  return httpClient({
@@ -38,6 +46,7 @@ var entityService = {
38
46
  updateEntityInfo: updateEntityInfo,
39
47
  createBankAccount: createBankAccount,
40
48
  retrieveEntityInfo: retrieveEntityInfo,
41
- updateIndividualInfo: updateIndividualInfo
49
+ updateIndividualInfo: updateIndividualInfo,
50
+ uploadFileInfo: uploadFileInfo
42
51
  };
43
52
  export { entityService };
@@ -36,6 +36,7 @@ declare const API: {
36
36
  createBankAccount: (data: EntityBankUpdateBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
37
37
  retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
38
38
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
39
+ uploadFileInfo: (data: import("./entity").UploadFileBody) => Promise<any>;
39
40
  };
40
41
  availabilityServices: {
41
42
  checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface DragAndDropProps {
3
+ title: string;
4
+ onSuccess?: (files: File) => void;
5
+ }
6
+ declare const DragAndDrop: ({ title, onSuccess }: DragAndDropProps) => JSX.Element;
7
+ export default DragAndDrop;
@@ -0,0 +1,39 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import Box from '@mui/material/Box';
14
+ import { alpha, styled } from '@mui/material/styles';
15
+ import Input from '../Input';
16
+ import Text from '../Text';
17
+ import { useDropzone } from 'react-dropzone';
18
+ var BoxStyled = styled(Box)(function (_a) {
19
+ var theme = _a.theme;
20
+ return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightRegular, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), border: "1px dashed ".concat(alpha(theme.palette.divider, 0.8)), width: '50%', cursor: 'pointer' }));
21
+ });
22
+ var UploadInputStyled = styled(Input)(function () { return ({
23
+ display: 'none'
24
+ }); });
25
+ var DragAndDrop = function (_a) {
26
+ var title = _a.title, onSuccess = _a.onSuccess;
27
+ var _b = useDropzone({
28
+ maxFiles: 1,
29
+ noKeyboard: true,
30
+ noClick: true,
31
+ multiple: false,
32
+ accept: { 'image/jpeg': ['.jpeg'], 'image/png': ['.png'], 'image/jpg': ['.jpg'], 'application/pdf': ['.pdf'] },
33
+ onDrop: function (files) {
34
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(files === null || files === void 0 ? void 0 : files[0]);
35
+ }
36
+ }), getRootProps = _b.getRootProps, getInputProps = _b.getInputProps;
37
+ return (_jsxs(BoxStyled, __assign({}, getRootProps({ className: 'dropzone' }), { children: [_jsx(Text, __assign({ sx: { fontSize: '12px' } }, { children: title })), _jsx(UploadInputStyled, { inputProps: __assign({}, getInputProps()) })] })));
38
+ };
39
+ export default DragAndDrop;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface UploadInputProps {
3
+ title: string;
4
+ onChange: (file: File) => void;
5
+ }
6
+ declare const UploadInput: ({ title, onChange }: UploadInputProps) => JSX.Element;
7
+ export default UploadInput;
@@ -0,0 +1,38 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { styled } from '@mui/material/styles';
14
+ import React from 'react';
15
+ import Box from '@mui/material/Box';
16
+ import Input from '../../components/Input';
17
+ import Text from '../Text';
18
+ var UploadInputStyled = styled(Input)(function () { return ({
19
+ display: 'none'
20
+ }); });
21
+ var UploadBoxStyled = styled(Box)(function (_a) {
22
+ var theme = _a.theme;
23
+ return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, padding: theme.spacing(1.5, 2.5, 1.5), cursor: 'pointer', width: '50%' }));
24
+ });
25
+ var UploadInput = function (_a) {
26
+ var title = _a.title, onChange = _a.onChange;
27
+ var fileRef = React.useRef(null);
28
+ var openDeviceMedia = function () {
29
+ var _a;
30
+ (_a = fileRef.current) === null || _a === void 0 ? void 0 : _a.click();
31
+ };
32
+ var onFileChange = function (event) {
33
+ if (event.target.files)
34
+ onChange === null || onChange === void 0 ? void 0 : onChange(event.target.files[0]);
35
+ };
36
+ return (_jsxs(UploadBoxStyled, __assign({ onClick: openDeviceMedia }, { children: [_jsx(Text, __assign({ sx: { fontSize: '12px' } }, { children: title })), _jsx(UploadInputStyled, { onChange: onFileChange, id: 'upload-file-input', inputRef: fileRef, type: 'file', inputProps: { accept: '.png,.jpg,.pdf,.jpeg' }, required: true })] })));
37
+ };
38
+ export default UploadInput;
@@ -0,0 +1,3 @@
1
+ import UploadInput from './UploadInput';
2
+ import DragAndDrop from './DragAndDrop';
3
+ export { DragAndDrop, UploadInput };
@@ -0,0 +1,3 @@
1
+ import UploadInput from './UploadInput';
2
+ import DragAndDrop from './DragAndDrop';
3
+ export { DragAndDrop, UploadInput };
@@ -27,4 +27,5 @@ export declare const ENDPOINT_PATHS: {
27
27
  BRAND_LIST: string;
28
28
  OCCUPATION: string;
29
29
  INDIVIDUAL: string;
30
+ FILES_PATH: string;
30
31
  };
@@ -26,6 +26,7 @@ var MONTHLY_INCOME_PATH = '/v2/monthlyIncome';
26
26
  var OCCUPATION_PATH = '/v2/occupation';
27
27
  var BRAND_LIST_PATH = '/brand/list';
28
28
  var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/locale.json';
29
+ var FILES = '/files';
29
30
  export var ENDPOINT_PATHS = {
30
31
  SANDBOX_BASE_URL: SANDBOX_BASE_URL,
31
32
  PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
@@ -54,5 +55,6 @@ export var ENDPOINT_PATHS = {
54
55
  IBAN_BANK: IBAN_PATH,
55
56
  BRAND_LIST: BRAND_LIST_PATH,
56
57
  OCCUPATION: OCCUPATION_PATH,
57
- INDIVIDUAL: INDIVIDUAL_PATH
58
+ INDIVIDUAL: INDIVIDUAL_PATH,
59
+ FILES_PATH: FILES
58
60
  };
@@ -41,6 +41,7 @@ export declare const ICONS_NAMES: {
41
41
  MOBILE_ICON: string;
42
42
  SEARCH_ICON: string;
43
43
  SUCCESS_GIF: string;
44
+ DELETE_ICON: string;
44
45
  GMAIL_Filled_ICON: string;
45
46
  GMAIL_White_ICON: string;
46
47
  outlook_Filled_ICON: string;
@@ -41,6 +41,7 @@ export var ICONS_NAMES = {
41
41
  MOBILE_ICON: 'https://dash.b-cdn.net/icons/menu/mobile.svg',
42
42
  SEARCH_ICON: 'https://dash.b-cdn.net/icons/menu/search-icon.svg',
43
43
  SUCCESS_GIF: 'https://dash.b-cdn.net/icons/menu/success_icon.gif',
44
+ DELETE_ICON: 'https://dash.b-cdn.net/icons/menu/delete-icon.png',
44
45
  GMAIL_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-filled.svg',
45
46
  GMAIL_White_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-white.svg',
46
47
  outlook_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-filled.svg',
@@ -5,6 +5,7 @@ export declare const MAX_IBAN_VALUE = 34;
5
5
  export declare const FL_NUMBER_LENGTH = 8;
6
6
  export declare const CR_NUMBER_LENGTH = 10;
7
7
  export declare const SAUDI_NUMBER_LENGTH = 9;
8
+ export declare const MAX_FILE_SIZE = 1000000;
8
9
  export declare const REGEX_FULL_NAME: RegExp;
9
10
  export declare const REGEX_WEBSITE: RegExp;
10
11
  export declare const REGEX_BENEFICIARY_NAME: RegExp;
@@ -5,6 +5,7 @@ export var MAX_IBAN_VALUE = 34;
5
5
  export var FL_NUMBER_LENGTH = 8;
6
6
  export var CR_NUMBER_LENGTH = 10;
7
7
  export var SAUDI_NUMBER_LENGTH = 9;
8
+ export var MAX_FILE_SIZE = 1000000;
8
9
  export var REGEX_FULL_NAME = /^([a-zA-Z]{2,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,})$/g;
9
10
  export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
10
11
  export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z\s])*$/g;
@@ -20,6 +20,7 @@ export declare const createBankAccount: import("@reduxjs/toolkit").AsyncThunk<{
20
20
  data: any;
21
21
  formData: BankFormValues;
22
22
  }, BankFormValues, {}>;
23
+ export declare const uploadBankStatement: import("@reduxjs/toolkit").AsyncThunk<any, File, {}>;
23
24
  export declare const checkIbanBank: import("@reduxjs/toolkit").AsyncThunk<{
24
25
  data: any;
25
26
  }, {
@@ -169,7 +169,8 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
169
169
  bank_account: {
170
170
  iban: iban,
171
171
  beneficiary_name: beneficiaryName,
172
- bank_name: bank_name
172
+ bank_name: bank_name,
173
+ bank_statement_file_id: params.bankStatementId
173
174
  },
174
175
  step_name: BANK_STEP_NAMES.BANK_INFO,
175
176
  encryption_contract: ['bank_account.iban', 'bank_account.beneficiary_name', 'bank_account.bank_name']
@@ -185,6 +186,24 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
185
186
  }
186
187
  });
187
188
  }); });
189
+ export var uploadBankStatement = createAsyncThunk('uploadBankStatement', function (file, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
190
+ var requestBody, data;
191
+ return __generator(this, function (_a) {
192
+ switch (_a.label) {
193
+ case 0:
194
+ requestBody = {
195
+ file_link_create: true,
196
+ title: file === null || file === void 0 ? void 0 : file.name,
197
+ purpose: 'identity_document',
198
+ file: file
199
+ };
200
+ return [4, API.entityService.uploadFileInfo(requestBody)];
201
+ case 1:
202
+ data = _a.sent();
203
+ return [2, data];
204
+ }
205
+ });
206
+ }); });
188
207
  export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
189
208
  var iban = _a.iban, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
190
209
  return __awaiter(void 0, void 0, void 0, function () {
@@ -252,7 +271,9 @@ var initialState = {
252
271
  iban: '',
253
272
  beneficiaryName: '',
254
273
  bankName: '',
255
- confirmPolicy: false
274
+ bankStatementId: '',
275
+ confirmPolicy: false,
276
+ uploading: false
256
277
  }
257
278
  }
258
279
  };
@@ -404,6 +425,20 @@ export var bankSlice = createSlice({
404
425
  if (action.error.message === 'Aborted')
405
426
  return;
406
427
  state.error = action.error.message;
428
+ })
429
+ .addCase(uploadBankStatement.pending, function (state) {
430
+ state.data.bankData.uploading = true;
431
+ state.error = null;
432
+ })
433
+ .addCase(uploadBankStatement.fulfilled, function (state, action) {
434
+ state.data.bankData.uploading = false;
435
+ state.error = null;
436
+ var id = action.payload.id;
437
+ state.data.bankData.responseBody = { fileId: id };
438
+ })
439
+ .addCase(uploadBankStatement.rejected, function (state, action) {
440
+ state.data.bankData.uploading = false;
441
+ state.error = action.error.message;
407
442
  });
408
443
  }
409
444
  });
@@ -47,7 +47,10 @@ export declare const resetPassword: import("@reduxjs/toolkit").AsyncThunk<{
47
47
  otp: string;
48
48
  };
49
49
  }, OTPFormValues, {}>;
50
- export declare const retrieveLead: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
50
+ export declare const retrieveLeadPassword: import("@reduxjs/toolkit").AsyncThunk<{
51
+ lead: any;
52
+ entity: any;
53
+ }, void, {}>;
51
54
  declare type VerifyData = {
52
55
  token: string;
53
56
  operationType?: string;
@@ -277,23 +277,26 @@ export var resetPassword = createAsyncThunk('resetPassword', function (params, t
277
277
  }
278
278
  });
279
279
  }); });
280
- export var retrieveLead = createAsyncThunk('retrieveLeadPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
281
- var _a, password, settings, id, data;
282
- var _b, _c, _d, _e;
283
- return __generator(this, function (_f) {
284
- switch (_f.label) {
280
+ export var retrieveLeadPassword = createAsyncThunk('retrieveLeadPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
281
+ var _a, password, settings, id, data, entityData;
282
+ var _b, _c, _d, _e, _f;
283
+ return __generator(this, function (_g) {
284
+ switch (_g.label) {
285
285
  case 0:
286
286
  _a = thunkApi.getState(), password = _a.password, settings = _a.settings;
287
287
  id = (password.data.verify.responseBody || { id: '' }).id;
288
288
  return [4, API.leadService.retrieveLead(id)];
289
289
  case 1:
290
- data = (_f.sent()).data;
291
- if (!(data === null || data === void 0 ? void 0 : data.errors)) {
290
+ data = (_g.sent()).data;
291
+ return [4, API.entityService.retrieveEntityInfo((_b = data === null || data === void 0 ? void 0 : data.entity) === null || _b === void 0 ? void 0 : _b.id)];
292
+ case 2:
293
+ entityData = (_g.sent()).data;
294
+ if (!(data === null || data === void 0 ? void 0 : data.errors) || !(entityData === null || entityData === void 0 ? void 0 : entityData.errors)) {
292
295
  thunkApi.dispatch(handleNextScreenStep());
293
- (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, { id: id });
294
- (_e = (_d = settings.data.appConfig).onFlowCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, { data: data });
296
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { id: id });
297
+ (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
295
298
  }
296
- return [2, data];
299
+ return [2, { lead: data, entity: entityData }];
297
300
  }
298
301
  });
299
302
  }); });
@@ -516,23 +519,23 @@ export var passwordSlice = createSlice({
516
519
  state.error = action.error.message;
517
520
  state.loading = false;
518
521
  })
519
- .addCase(retrieveLead.fulfilled, function (state, action) {
520
- var _a;
522
+ .addCase(retrieveLeadPassword.fulfilled, function (state, action) {
523
+ var _a, _b;
521
524
  state.loading = false;
522
525
  state.error = null;
523
- var data = action.payload;
524
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
526
+ var _c = action.payload, lead = _c.lead, entity = _c.entity;
527
+ var description = (((_a = lead === null || lead === void 0 ? void 0 : lead.errors) === null || _a === void 0 ? void 0 : _a[0]) || ((_b = entity === null || entity === void 0 ? void 0 : entity.errors) === null || _b === void 0 ? void 0 : _b[0]) || {}).description;
525
528
  if (description) {
526
529
  state.error = description;
527
530
  return;
528
531
  }
529
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
532
+ state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), lead), entity);
530
533
  })
531
- .addCase(retrieveLead.pending, function (state) {
534
+ .addCase(retrieveLeadPassword.pending, function (state) {
532
535
  state.loading = true;
533
536
  state.error = null;
534
537
  })
535
- .addCase(retrieveLead.rejected, function (state, action) {
538
+ .addCase(retrieveLeadPassword.rejected, function (state, action) {
536
539
  state.loading = false;
537
540
  state.error = action.error.message;
538
541
  });
@@ -27,6 +27,7 @@ import { bankSelector, createBankAccount } from '../../../app/bank/bankStore';
27
27
  import Form from '../../../../components/Form';
28
28
  import { handleCurrentActiveScreen } from '../../../../app/settings';
29
29
  import ConfirmPolicy from './ConfirmPolicy';
30
+ import BankStatement from './BankStatement';
30
31
  var FormStyled = styled(Form)(function () { return ({
31
32
  display: 'flex',
32
33
  flexDirection: 'column',
@@ -56,6 +57,6 @@ var BankDetails = function () {
56
57
  dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
57
58
  };
58
59
  var disabled = ibanChecking || !methods.formState.isValid;
59
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
60
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
60
61
  };
61
62
  export default BankDetails;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const BankStatement: () => JSX.Element;
3
+ export default BankStatement;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { styled } from '@mui/material/styles';
4
+ import { ScreenContainer } from '../../../../features/shared/Containers';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { useController, useFormContext } from 'react-hook-form';
7
+ import UploadFile from '../../../../features/shared/UploadFile';
8
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
9
+ import { bankSelector, uploadBankStatement } from '../../../../features/app/bank/bankStore';
10
+ var FeatureStyled = styled(ScreenContainer)(function (_a) {
11
+ var theme = _a.theme;
12
+ return ({
13
+ marginBlockStart: theme.spacing(3)
14
+ });
15
+ });
16
+ var BankStatement = function () {
17
+ var _a, _b;
18
+ var dispatch = useAppDispatch();
19
+ var data = useAppSelector(bankSelector).data;
20
+ var t = useTranslation().t;
21
+ var control = useFormContext().control;
22
+ var bankStatementControl = useController({ name: 'bankStatementId', control: control });
23
+ var error = (_a = bankStatementControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
24
+ var uploading = data.bankData.uploading;
25
+ var handleBankStatementChange = function (file) {
26
+ dispatch(uploadBankStatement(file));
27
+ };
28
+ var handleReset = function () {
29
+ bankStatementControl.field.onChange('');
30
+ };
31
+ React.useEffect(function () {
32
+ var _a, _b;
33
+ if ((_a = data.bankData.responseBody) === null || _a === void 0 ? void 0 : _a.fileId)
34
+ bankStatementControl.field.onChange((_b = data.bankData.responseBody) === null || _b === void 0 ? void 0 : _b.fileId);
35
+ }, [(_b = data.bankData.responseBody) === null || _b === void 0 ? void 0 : _b.fileId]);
36
+ return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), dragTitle: t('drag_and_drop'), uploadTitle: t('title_upload_file'), onFileUploaded: handleBankStatementChange, loading: uploading, onReset: handleReset, error: error && t(error) }) }));
37
+ };
38
+ export default BankStatement;
@@ -3,15 +3,18 @@ export declare const BankValidation: yup.ObjectSchema<import("yup/lib/object").A
3
3
  iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
4
  bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
5
5
  beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ bankStatementId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
6
7
  confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
7
8
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
8
9
  iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
9
10
  bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
10
11
  beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
12
+ bankStatementId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
11
13
  confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
12
14
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
13
15
  iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
14
16
  bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
15
17
  beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
18
+ bankStatementId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
16
19
  confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
17
20
  }>>>;
@@ -12,5 +12,6 @@ export var BankValidation = yup.object().shape({
12
12
  .string()
13
13
  .matches(REGEX_BENEFICIARY_NAME, 'beneficiary_name_invalid')
14
14
  .required('beneficiary_name_required'),
15
+ bankStatementId: yup.string().optional(),
15
16
  confirmPolicy: yup.boolean().required('alert_bank_confirm').isTrue('alert_bank_confirm')
16
17
  });
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
5
- import { updateLeadSuccess, passwordSelector, retrieveLead } from '../../../app/password/passwordStore';
5
+ import { updateLeadSuccess, passwordSelector, retrieveLeadPassword } from '../../../app/password/passwordStore';
6
6
  import SuccessScreen from '../../../shared/SuccessScreen';
7
7
  import { PASSWORD_OPERATION_TYPE } from '../../../../constants';
8
8
  var Success = function (_a) {
@@ -12,7 +12,7 @@ var Success = function (_a) {
12
12
  var operationType = data.verify.operationType;
13
13
  var onSuccess = function () {
14
14
  if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
15
- dispatch(retrieveLead());
15
+ dispatch(retrieveLeadPassword());
16
16
  return;
17
17
  }
18
18
  dispatch(updateLeadSuccess());
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export declare const InputContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
+ children?: React.ReactNode;
4
+ component?: React.ElementType<any> | undefined;
5
+ ref?: React.Ref<unknown> | undefined;
6
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
7
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
8
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
9
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
10
+ interface UploadFileProps {
11
+ label: string;
12
+ required?: boolean;
13
+ dragTitle: string;
14
+ uploadTitle: string;
15
+ error?: string;
16
+ loading?: boolean;
17
+ onFileUploaded: (file: File) => void;
18
+ onReset: () => void;
19
+ }
20
+ declare const UploadFile: ({ label, required, dragTitle, uploadTitle, loading, error, onFileUploaded, onReset }: UploadFileProps) => JSX.Element;
21
+ export default UploadFile;
@@ -0,0 +1,77 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import React from 'react';
14
+ import { styled } from '@mui/material/styles';
15
+ import { ScreenContainer } from '../../shared/Containers';
16
+ import Box from '@mui/material/Box';
17
+ import { InputLabelStyled } from '../../shared/Input/Input';
18
+ import Mandatory from '../../shared/Mandatory';
19
+ import { DragAndDrop, UploadInput } from '../../../components/FileInput';
20
+ import Collapse from '../../../components/Collapse';
21
+ import Warning from '../../../components/Warning';
22
+ import Icon from '../../../components/Icon';
23
+ import { ICONS_NAMES } from '../../../constants';
24
+ import { useTranslation } from 'react-i18next';
25
+ import Loader from '../../../components/Loader';
26
+ var FeatureStyled = styled(ScreenContainer)(function (_a) {
27
+ var theme = _a.theme;
28
+ return ({
29
+ marginBlockStart: theme.spacing(0)
30
+ });
31
+ });
32
+ var LabelContainerStyled = styled(Box)(function (_a) {
33
+ var theme = _a.theme;
34
+ return ({
35
+ display: 'flex',
36
+ justifyContent: 'flex-start',
37
+ padding: theme.spacing(0, 2.5, 1.25, 2.5)
38
+ });
39
+ });
40
+ var BoxStyled = styled(Box)(function (_a) {
41
+ var theme = _a.theme;
42
+ return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightBold, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), width: '85%' }));
43
+ });
44
+ var UploadBoxStyled = styled(Box)(function (_a) {
45
+ var theme = _a.theme;
46
+ return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, padding: theme.spacing(0.75, 1.75, 0), cursor: 'pointer', width: '15%', display: 'flex', justifyContent: 'center' }));
47
+ });
48
+ var IconStyled = styled(Icon)(function (_a) {
49
+ var theme = _a.theme;
50
+ return ({
51
+ marginBlockStart: theme.spacing(0),
52
+ width: theme.spacing(3.5),
53
+ height: theme.spacing(3.5)
54
+ });
55
+ });
56
+ export var InputContainerStyled = styled(Box)(function (_a) {
57
+ var theme = _a.theme;
58
+ return ({
59
+ display: 'flex',
60
+ width: '100%'
61
+ });
62
+ });
63
+ var UploadFile = function (_a) {
64
+ var label = _a.label, required = _a.required, dragTitle = _a.dragTitle, uploadTitle = _a.uploadTitle, loading = _a.loading, error = _a.error, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
65
+ var _b = React.useState(''), fileName = _b[0], setFileName = _b[1];
66
+ var t = useTranslation().t;
67
+ var handleFileChange = function (file) {
68
+ setFileName(file === null || file === void 0 ? void 0 : file.name);
69
+ onFileUploaded === null || onFileUploaded === void 0 ? void 0 : onFileUploaded(file);
70
+ };
71
+ var handleReset = function () {
72
+ setFileName('');
73
+ onReset === null || onReset === void 0 ? void 0 : onReset();
74
+ };
75
+ return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(DragAndDrop, { title: dragTitle, onSuccess: handleFileChange }), _jsx(UploadInput, { title: uploadTitle, onChange: handleFileChange })] }) })), _jsx(Collapse, __assign({ in: !!fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(BoxStyled, { children: loading ? t('loading_bank_statement') : fileName }), _jsxs(UploadBoxStyled, __assign({ onClick: handleReset }, { children: [_jsx(Collapse, __assign({ in: !loading }, { children: _jsx(IconStyled, { src: ICONS_NAMES.DELETE_ICON }) })), _jsx(Collapse, __assign({ in: loading }, { children: _jsx(Loader, { innerColor: 'white', outerColor: 'white', toggleAnimation: true, style: { width: 30, height: 30 }, svgStyle: { width: 30, height: 30 } }) }))] }))] }) })), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: error })) }))] }));
76
+ };
77
+ export default UploadFile;
@@ -0,0 +1,2 @@
1
+ import UploadFile from './UploadFile';
2
+ export default UploadFile;
@@ -0,0 +1,2 @@
1
+ import UploadFile from './UploadFile';
2
+ export default UploadFile;
package/package.json CHANGED
@@ -1,127 +1,128 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.100-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": "^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": "1.1.0-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": "^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-dropzone": "^14.2.2",
98
+ "react-hook-form": "^7.33.1",
99
+ "react-i18next": "^11.18.1",
100
+ "react-otp-input": "^2.4.0",
101
+ "react-redux": "^8.0.2",
102
+ "react-spring-bottom-sheet": "^3.4.1",
103
+ "yup": "^0.32.11"
104
+ },
105
+ "peerDependencies": {
106
+ "react": "^18.2.0",
107
+ "react-dom": "^18.2.0"
108
+ },
109
+ "lint-staged": {
110
+ "src/**/*.{ts,tsx,json,js,jsx}": [
111
+ "yarn run prettier:fix",
112
+ "yarn run lint",
113
+ "git add ."
114
+ ]
115
+ },
116
+ "browserslist": {
117
+ "production": [
118
+ ">0.2%",
119
+ "not dead",
120
+ "not op_mini all"
121
+ ],
122
+ "development": [
123
+ "last 1 chrome version",
124
+ "last 1 firefox version",
125
+ "last 1 safari version"
126
+ ]
127
+ }
128
+ }