@tap-payments/auth-jsconnect 2.0.61-test → 2.0.62-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.
@@ -52,6 +52,6 @@ declare const entityService: {
52
52
  retrieveBankAccount: (id: string) => Promise<any>;
53
53
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
54
54
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
55
- uploadFileInfo: (data: UploadFileBody) => Promise<any>;
55
+ uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
56
56
  };
57
57
  export { entityService };
@@ -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
  var __rest = (this && this.__rest) || function (s, e) {
2
13
  var t = {};
3
14
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -31,13 +42,8 @@ var retrieveBankAccount = function (id) {
31
42
  url: "".concat(ENDPOINT_PATHS.BANK, "/").concat(id)
32
43
  });
33
44
  };
34
- var uploadFileInfo = function (data) {
35
- return httpClient({
36
- method: 'post',
37
- url: "".concat(ENDPOINT_PATHS.FILES_PATH),
38
- data: data,
39
- headers: { 'Content-Type': 'multipart/form-data' }
40
- });
45
+ var uploadFileInfo = function (data, config) {
46
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.FILES_PATH), data: data, headers: { 'Content-Type': 'multipart/form-data' } }, config));
41
47
  };
42
48
  var updateIndividualInfo = function (_a) {
43
49
  var id = _a.id, data = __rest(_a, ["id"]);
@@ -40,7 +40,7 @@ declare const API: {
40
40
  retrieveBankAccount: (id: string) => Promise<any>;
41
41
  retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
42
42
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
43
- uploadFileInfo: (data: import("./entity").UploadFileBody) => Promise<any>;
43
+ uploadFileInfo: (data: import("./entity").UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
44
44
  };
45
45
  availabilityServices: {
46
46
  checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -6,10 +6,11 @@ interface DragAndDropProps {
6
6
  uploadingTitle: string;
7
7
  successTitle: string;
8
8
  error?: string;
9
+ progress?: number;
9
10
  uploading?: boolean;
10
11
  uploadSuccess?: boolean;
11
12
  fileExists: boolean;
12
13
  onSuccess?: (files: File) => void;
13
14
  }
14
- declare const DragAndDrop: ({ title, subTitle, description, error, uploadingTitle, successTitle, uploading, fileExists, uploadSuccess, onSuccess }: DragAndDropProps) => JSX.Element;
15
+ declare const DragAndDrop: ({ title, subTitle, description, error, uploadingTitle, successTitle, progress, uploading, fileExists, uploadSuccess, onSuccess }: DragAndDropProps) => JSX.Element;
15
16
  export default DragAndDrop;
@@ -91,16 +91,22 @@ var DropFileIcon = styled(Icon)(function (_a) {
91
91
  marginInline: theme.spacing(-1.25)
92
92
  });
93
93
  });
94
+ var TextDoneStyled = styled(Text)(function (_a) {
95
+ var theme = _a.theme;
96
+ return ({
97
+ marginBlockStart: theme.spacing(1),
98
+ color: theme.palette.text.primary
99
+ });
100
+ });
94
101
  var WarningContainer = styled(Box)(function (_a) {
95
102
  var theme = _a.theme;
96
103
  return (__assign({ background: theme.palette.warning.dark, paddingBlock: theme.spacing(1.5), paddingInlineStart: theme.spacing(2.5), border: '0.5px solid', display: 'flex', justifyContent: 'space-around', borderColor: theme.palette.warning.main, color: theme.palette.warning.light, padding: theme.spacing(0.5, 1), borderRadius: theme.spacing(12.5) }, theme.typography.caption));
97
104
  });
98
105
  var DragAndDrop = function (_a) {
99
- var title = _a.title, subTitle = _a.subTitle, description = _a.description, error = _a.error, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, uploading = _a.uploading, fileExists = _a.fileExists, uploadSuccess = _a.uploadSuccess, onSuccess = _a.onSuccess;
100
- var _b = React.useState(1), progress = _b[0], setProgress = _b[1];
101
- var _c = React.useState(false), dragActive = _c[0], setDragActive = _c[1];
102
- var _d = React.useState(false), showDone = _d[0], setShowDone = _d[1];
103
- var _e = useDropzone({
106
+ var title = _a.title, subTitle = _a.subTitle, description = _a.description, error = _a.error, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, progress = _a.progress, uploading = _a.uploading, fileExists = _a.fileExists, uploadSuccess = _a.uploadSuccess, onSuccess = _a.onSuccess;
107
+ var _b = React.useState(false), dragActive = _b[0], setDragActive = _b[1];
108
+ var _c = React.useState(false), showDone = _c[0], setShowDone = _c[1];
109
+ var _d = useDropzone({
104
110
  maxFiles: 1,
105
111
  noKeyboard: true,
106
112
  noClick: false,
@@ -116,29 +122,16 @@ var DragAndDrop = function (_a) {
116
122
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(files === null || files === void 0 ? void 0 : files[0]);
117
123
  setDragActive(false);
118
124
  }
119
- }), getRootProps = _e.getRootProps, getInputProps = _e.getInputProps;
125
+ }), getRootProps = _d.getRootProps, getInputProps = _d.getInputProps;
120
126
  React.useEffect(function () {
121
127
  setDragActive(false);
122
128
  if (uploadSuccess) {
123
129
  setShowDone(true);
124
130
  setTimeout(function () {
125
- setProgress(100);
126
131
  setShowDone(false);
127
- }, 500);
128
- }
129
- else if (uploading) {
130
- var timer_1 = setInterval(function () {
131
- setProgress(function (prevProgress) { return (prevProgress >= 75 ? 1 : prevProgress + 25); });
132
- }, 800);
133
- return function () {
134
- clearInterval(timer_1);
135
- };
132
+ }, 400);
136
133
  }
137
134
  }, [uploading]);
138
- React.useEffect(function () {
139
- if (!fileExists)
140
- setProgress(25);
141
- }, [fileExists]);
142
- return (_jsx(Box, __assign({ id: 'upload-container' }, { children: _jsxs(BoxStyled, __assign({ active: dragActive }, getRootProps({ className: 'dropzone' }), { children: [_jsx(Fade, __assign({ in: (!uploading && !uploadSuccess) || !fileExists, unmountOnExit: true, timeout: 100 }, { children: _jsxs(Box, { children: [_jsx(CenterBoxStyled, { children: _jsx(IconStyled, { src: dragActive ? ICONS_NAMES.ACTIVE_UPLOAD_ICON : ICONS_NAMES.UPLOAD_ICON }) }), _jsxs(VerticalCenterBox, __assign({ sx: { marginBlockEnd: '20px' } }, { children: [_jsxs(CenterBoxStyled, { children: [_jsx(Text, __assign({ sx: { fontSize: '16px' } }, { children: title })), _jsx(SubTitleStyled, { children: subTitle })] }), _jsx(DescTextStyled, { children: description }), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsxs(WarningContainer, { children: [_jsx(WarningIconStyled, { src: ICONS_NAMES.WARNING_ICON }), _jsx(Text, { children: error })] }) }))] })), _jsx(UploadInputStyled, { inputProps: __assign({}, getInputProps()) })] }) })), _jsx(CenterBoxStyled, { children: showDone ? (_jsxs(VerticalCenterBox, { children: [_jsx(DoneIconStyled, { src: ICONS_NAMES.DONE_ICON }), _jsx(Text, { children: successTitle })] })) : uploading ? (_jsxs(VerticalCenterBox, { children: [_jsx(CircularProgress, { value: progress, size: 54 }), _jsx(Text, { children: uploadingTitle })] })) : (_jsx(_Fragment, {})) }), _jsx(Fade, __assign({ unmountOnExit: true, timeout: 100, in: dragActive }, { children: _jsx(DropFileIcon, { src: ICONS_NAMES.DROP_FILE_ICON }) }))] })) })));
135
+ return (_jsx(Box, __assign({ id: 'upload-container' }, { children: _jsxs(BoxStyled, __assign({ active: dragActive }, getRootProps({ className: 'dropzone' }), { children: [_jsx(Fade, __assign({ in: (!uploading && !uploadSuccess) || !fileExists, unmountOnExit: true, timeout: 100 }, { children: _jsxs(Box, { children: [_jsx(CenterBoxStyled, { children: _jsx(IconStyled, { src: dragActive ? ICONS_NAMES.ACTIVE_UPLOAD_ICON : ICONS_NAMES.UPLOAD_ICON }) }), _jsxs(VerticalCenterBox, __assign({ sx: { marginBlockEnd: '20px' } }, { children: [_jsxs(CenterBoxStyled, { children: [_jsx(Text, __assign({ sx: { fontSize: '16px' } }, { children: title })), _jsx(SubTitleStyled, { children: subTitle })] }), _jsx(DescTextStyled, { children: description }), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsxs(WarningContainer, { children: [_jsx(WarningIconStyled, { src: ICONS_NAMES.WARNING_ICON }), _jsx(Text, { children: error })] }) }))] })), _jsx(UploadInputStyled, { inputProps: __assign({}, getInputProps()) })] }) })), _jsx(CenterBoxStyled, { children: showDone ? (_jsxs(VerticalCenterBox, { children: [_jsx(DoneIconStyled, { src: ICONS_NAMES.DONE_ICON }), _jsx(TextDoneStyled, { children: successTitle })] })) : uploading ? (_jsxs(VerticalCenterBox, { children: [_jsx(CircularProgress, { value: progress, size: 54 }), _jsx(Text, { children: uploadingTitle })] })) : (_jsx(_Fragment, {})) })] })) })));
143
136
  };
144
137
  export default DragAndDrop;
@@ -10,6 +10,6 @@ export var MAX_FILE_SIZE = 5000000;
10
10
  export var VALID_FILE_FORMATS = ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'];
11
11
  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;
12
12
  export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
13
- export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z\s])*$/g;
13
+ export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z()\s])*$/g;
14
14
  export var REGEX_BRAND_NAME = /^(([a-zA-Z0-9])+\s)*[a-zA-Z0-9]+$/;
15
15
  export var EMAIL_MAX_LENGTH = 50;
@@ -33,9 +33,13 @@ export declare const checkIbanBank: import("@reduxjs/toolkit").AsyncThunk<{
33
33
  cancelToken: CancelToken;
34
34
  onSuccess?: (() => void) | undefined;
35
35
  }, {}>;
36
+ interface UploadBankStatementParams {
37
+ file: File;
38
+ onProgress?: (value: number) => void;
39
+ }
36
40
  export declare const uploadBankStatement: import("@reduxjs/toolkit").AsyncThunk<{
37
41
  data: any;
38
- }, File, {}>;
42
+ }, UploadBankStatementParams, {}>;
39
43
  export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
40
44
  response: any;
41
45
  formData: void;
@@ -209,24 +209,31 @@ export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
209
209
  });
210
210
  });
211
211
  });
212
- export var uploadBankStatement = createAsyncThunk('uploadBankStatement', function (file) { return __awaiter(void 0, void 0, void 0, function () {
213
- var uploadPayload, data;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
216
- case 0:
217
- uploadPayload = {
218
- file_link_create: true,
219
- title: file === null || file === void 0 ? void 0 : file.name,
220
- purpose: 'identity_document',
221
- file: file
222
- };
223
- return [4, API.entityService.uploadFileInfo(uploadPayload)];
224
- case 1:
225
- data = _a.sent();
226
- return [2, { data: data }];
227
- }
212
+ export var uploadBankStatement = createAsyncThunk('uploadBankStatement', function (_a) {
213
+ var file = _a.file, onProgress = _a.onProgress;
214
+ return __awaiter(void 0, void 0, void 0, function () {
215
+ var uploadPayload, onUploadProgress, data;
216
+ return __generator(this, function (_b) {
217
+ switch (_b.label) {
218
+ case 0:
219
+ uploadPayload = {
220
+ file_link_create: true,
221
+ title: file === null || file === void 0 ? void 0 : file.name,
222
+ purpose: 'identity_document',
223
+ file: file
224
+ };
225
+ onUploadProgress = function (progressEvent) {
226
+ var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
227
+ onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
228
+ };
229
+ return [4, API.entityService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
230
+ case 1:
231
+ data = _b.sent();
232
+ return [2, { data: data }];
233
+ }
234
+ });
228
235
  });
229
- }); });
236
+ });
230
237
  export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
231
238
  var _a, settings, bank, _b, id, infoId, payload, data;
232
239
  var _c, _d, _e, _f;
@@ -431,7 +438,7 @@ export var bankSlice = createSlice({
431
438
  var data = action.payload.data;
432
439
  state.data.bankData.bankStatementId = data === null || data === void 0 ? void 0 : data.id;
433
440
  })
434
- .addCase(uploadBankStatement.rejected, function (state, action) {
441
+ .addCase(uploadBankStatement.rejected, function (state) {
435
442
  state.uploading = false;
436
443
  state.error = 'file_upload_error';
437
444
  });
@@ -16,11 +16,12 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
16
16
  });
17
17
  var BankStatement = function () {
18
18
  var _a, _b;
19
+ var _c = React.useState(0), progress = _c[0], setProgress = _c[1];
19
20
  var t = useTranslation().t;
20
- var _c = useFormContext(), control = _c.control, setError = _c.setError, clearErrors = _c.clearErrors;
21
+ var _d = useFormContext(), control = _d.control, setError = _d.setError, clearErrors = _d.clearErrors;
21
22
  var bankStatementFileControl = useController({ name: 'bankStatementFile', control: control });
22
23
  var bankStatementIdControl = useController({ name: 'bankStatementId', control: control });
23
- var _d = useAppSelector(bankSelector), loading = _d.loading, uploading = _d.uploading, sysError = _d.error;
24
+ var _e = useAppSelector(bankSelector), loading = _e.loading, uploading = _e.uploading, sysError = _e.error;
24
25
  var dispatch = useAppDispatch();
25
26
  var bankStatementValue = bankStatementFileControl.field.value;
26
27
  var error = ((_a = bankStatementFileControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message) || ((_b = bankStatementIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message);
@@ -33,23 +34,30 @@ var BankStatement = function () {
33
34
  }
34
35
  else {
35
36
  bankStatementFileControl.field.onChange(file);
36
- dispatch(uploadBankStatement(file));
37
+ dispatch(uploadBankStatement({
38
+ file: file,
39
+ onProgress: function (value) {
40
+ setProgress(value);
41
+ }
42
+ }));
37
43
  }
38
44
  };
39
45
  var handleReset = function () {
40
46
  bankStatementFileControl.field.onChange(null);
41
47
  bankStatementIdControl.field.onChange('');
48
+ setProgress(0);
42
49
  };
43
50
  React.useEffect(function () {
44
51
  if (sysError === 'file_upload_error') {
45
52
  setError('bankStatementId', { message: sysError });
46
53
  bankStatementFileControl.field.onChange(null);
54
+ setProgress(0);
47
55
  }
48
56
  }, [sysError]);
49
57
  React.useEffect(function () {
50
58
  if ((bankStatementFileControl.formState.isValid || !!bankStatementValue) && error != 'file_upload_error')
51
59
  clearErrors();
52
60
  }, [bankStatementFileControl.formState.isValid, bankStatementValue]);
53
- return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBankStatementChange, isFileUploaded: !uploading && !!bankStatementValue, isSubmitting: loading, isUploading: uploading, onReset: handleReset, error: error && t(error) }) }));
61
+ return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBankStatementChange, isFileUploaded: !uploading && !!bankStatementValue, isSubmitting: loading, isUploading: uploading, progress: progress, onReset: handleReset, error: error && t(error) }) }));
54
62
  };
55
63
  export default BankStatement;
@@ -16,11 +16,12 @@ interface UploadFileProps {
16
16
  uploadingTitle: string;
17
17
  successTitle: string;
18
18
  error?: string;
19
+ progress?: number;
19
20
  isSubmitting?: boolean;
20
21
  isUploading?: boolean;
21
22
  isFileUploaded?: boolean;
22
23
  onFileUploaded: (file: File) => void;
23
24
  onReset: () => void;
24
25
  }
25
- declare const UploadFile: ({ label, required, title, subTitle, dragDescription, uploadingTitle, successTitle, isSubmitting, isUploading, isFileUploaded, error, onFileUploaded, onReset }: UploadFileProps) => JSX.Element;
26
+ declare const UploadFile: ({ label, required, title, subTitle, dragDescription, uploadingTitle, successTitle, isSubmitting, isUploading, isFileUploaded, error, progress, onFileUploaded, onReset }: UploadFileProps) => JSX.Element;
26
27
  export default UploadFile;
@@ -64,7 +64,7 @@ export var InputContainerStyled = styled(Box)(function (_a) {
64
64
  });
65
65
  });
66
66
  var UploadFile = function (_a) {
67
- var label = _a.label, required = _a.required, title = _a.title, subTitle = _a.subTitle, dragDescription = _a.dragDescription, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, isSubmitting = _a.isSubmitting, isUploading = _a.isUploading, isFileUploaded = _a.isFileUploaded, error = _a.error, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
67
+ var label = _a.label, required = _a.required, title = _a.title, subTitle = _a.subTitle, dragDescription = _a.dragDescription, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, isSubmitting = _a.isSubmitting, isUploading = _a.isUploading, isFileUploaded = _a.isFileUploaded, error = _a.error, progress = _a.progress, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
68
68
  var _b = React.useState(''), fileName = _b[0], setFileName = _b[1];
69
69
  var _c = React.useState(false), showFile = _c[0], setShowFile = _c[1];
70
70
  var handleFileChange = function (file) {
@@ -86,6 +86,6 @@ var UploadFile = function (_a) {
86
86
  else
87
87
  setShowFile(false);
88
88
  }, [isFileUploaded]);
89
- return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !showFile }, { children: _jsx(InputContainerStyled, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: !!fileName, uploadingTitle: uploadingTitle, successTitle: successTitle, uploading: isUploading, uploadSuccess: isFileUploaded, onSuccess: handleFileChange, error: error }) }) })), _jsx(Collapse, __assign({ in: showFile, timeout: 300 }, { children: _jsxs(InputContainerStyled, { children: [_jsxs(BoxStyled, { children: [_jsxs(Box, __assign({ sx: { display: 'flex' } }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: fileName })] })), _jsx(Box, { children: _jsx(CheckIcon, {}) })] }), _jsx(UploadBoxStyled, __assign({ onClick: handleReset }, { children: _jsx(ClearIconStyled, {}) }))] }) }))] }));
89
+ return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !showFile }, { children: _jsx(InputContainerStyled, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: !!fileName, uploadingTitle: uploadingTitle, successTitle: successTitle, progress: progress, uploading: isUploading, uploadSuccess: isFileUploaded, onSuccess: handleFileChange, error: error }) }) })), _jsx(Collapse, __assign({ in: showFile, timeout: 300 }, { children: _jsxs(InputContainerStyled, { children: [_jsxs(BoxStyled, { children: [_jsxs(Box, __assign({ sx: { display: 'flex' } }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: fileName })] })), _jsx(Box, { children: _jsx(CheckIcon, {}) })] }), _jsx(UploadBoxStyled, __assign({ onClick: handleReset }, { children: _jsx(ClearIconStyled, {}) }))] }) }))] }));
90
90
  };
91
91
  export default UploadFile;
package/package.json CHANGED
@@ -1,129 +1,129 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.61-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.62-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
+ }