@idscan/idvc2 2.1.0 → 2.1.2
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.
- package/README.md +10 -5
- package/dist/js/environment/langs.ts +26 -12
- package/dist/js/idvc.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This component works in phones with the operating system Android in the browser
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
$ npm install @idscan/
|
|
24
|
+
$ npm install @idscan/idvc2
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This component contains JS, CSS files which require the mandatory import into your project.
|
|
@@ -48,7 +48,7 @@ There are binary files in the folder which do not have the extension. These file
|
|
|
48
48
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
49
49
|
|
|
50
50
|
new CopyWebpackPlugin ([{
|
|
51
|
-
from: 'node_modules/@idscan/
|
|
51
|
+
from: 'node_modules/@idscan/idvc2/dist/networks/*',
|
|
52
52
|
to: 'networks/[name].[ext]',
|
|
53
53
|
toType: 'template',
|
|
54
54
|
}]);
|
|
@@ -60,7 +60,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
60
60
|
new CopyWebpackPlugin({
|
|
61
61
|
patterns: [
|
|
62
62
|
{
|
|
63
|
-
from: 'node_modules/@idscan/
|
|
63
|
+
from: 'node_modules/@idscan/idvc2/dist/networks/*',
|
|
64
64
|
to: 'networks/[name][ext]',
|
|
65
65
|
toType: 'template',
|
|
66
66
|
},
|
|
@@ -71,8 +71,8 @@ new CopyWebpackPlugin({
|
|
|
71
71
|
1.3. Import the library and css to your project.
|
|
72
72
|
|
|
73
73
|
```javascript
|
|
74
|
-
import IDVC from '@idscan/
|
|
75
|
-
import '@idscan/
|
|
74
|
+
import IDVC from '@idscan/idvc2'
|
|
75
|
+
import '@idscan/idvc2/dist/css/idvc.css'
|
|
76
76
|
|
|
77
77
|
```
|
|
78
78
|
## Initialization
|
|
@@ -391,6 +391,11 @@ The component has the following customizable properties:
|
|
|
391
391
|
- description of capture progress
|
|
392
392
|
|
|
393
393
|
## Version history
|
|
394
|
+
- **2.1.2**
|
|
395
|
+
- fixed change document type
|
|
396
|
+
- **2.1.1**
|
|
397
|
+
- updated camera module
|
|
398
|
+
- improved camera errors handling
|
|
394
399
|
- **2.1.0**
|
|
395
400
|
- removed additional fonts
|
|
396
401
|
- added step swiping if an image is uploaded
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CameraNotSupportedReason } from '../types/modules/camera.enum';
|
|
2
|
+
|
|
1
3
|
type LabelGroup = 'errorCodes' | 'hintTexts' | 'keyErrors' | 'typeError'
|
|
2
4
|
| 'camera' | 'general' | 'uploaderDescription' | 'documentsTypes';
|
|
3
5
|
|
|
@@ -17,19 +19,19 @@ type GetTranslation = {
|
|
|
17
19
|
(groupName: 'general'): IGeneral,
|
|
18
20
|
(groupName: LabelGroup): AllTypes,
|
|
19
21
|
};
|
|
20
|
-
export type ErrorCodeNames =
|
|
22
|
+
export type ErrorCodeNames =
|
|
23
|
+
'mrz'
|
|
24
|
+
| 'barcode'
|
|
25
|
+
| 'heic'
|
|
26
|
+
| 'fileType'
|
|
27
|
+
| 'fileTypeHeic'
|
|
28
|
+
| 'disableStepFileUpload'
|
|
29
|
+
| 'notAllowedDocument'
|
|
30
|
+
| 'frontSide'
|
|
31
|
+
| 'default'
|
|
32
|
+
| keyof typeof CameraNotSupportedReason;
|
|
21
33
|
export type SupportedLanguage = typeof supportedLanguages[number];
|
|
22
|
-
|
|
23
|
-
interface IErrorCodes {
|
|
24
|
-
mrz: string,
|
|
25
|
-
barcode: string,
|
|
26
|
-
heic: string,
|
|
27
|
-
fileType: string,
|
|
28
|
-
fileTypeHeic: string,
|
|
29
|
-
disableStepFileUpload: string,
|
|
30
|
-
notAllowedDocument: string,
|
|
31
|
-
frontSide: string,
|
|
32
|
-
}
|
|
34
|
+
type IErrorCodes = Record<ErrorCodeNames, string>;
|
|
33
35
|
|
|
34
36
|
interface IHintTexts {
|
|
35
37
|
front: string,
|
|
@@ -114,6 +116,12 @@ const labels: AllLabels = {
|
|
|
114
116
|
disableStepFileUpload: 'Se debe utilizar un dispositivo con una cámara para capturar esta imagen',
|
|
115
117
|
notAllowedDocument: 'Este tipo de documento no está permitido',
|
|
116
118
|
frontSide: 'Advertencia: <br/>No se pudo leer la parte frontal del documento. <br/>Intenta tomar una imagen de mayor calidad',
|
|
119
|
+
default: 'Lo sentimos, pero algo salió mal. Inténtalo de nuevo',
|
|
120
|
+
CameraNotFound: 'No se encontró ninguna cámara en su dispositivo',
|
|
121
|
+
CameraNotAllowed: 'Se le ha denegado el permiso para acceder a la cámara',
|
|
122
|
+
CameraNotAvailable: 'La cámara no está disponible en este momento',
|
|
123
|
+
CameraInUse: 'La cámara ya está en uso',
|
|
124
|
+
MediaDevicesNotSupported: 'Tu navegador no es compatible',
|
|
117
125
|
},
|
|
118
126
|
hintTexts: {
|
|
119
127
|
front: 'Coloque el anverso del documento',
|
|
@@ -189,6 +197,12 @@ const labels: AllLabels = {
|
|
|
189
197
|
disableStepFileUpload: 'A device with a camera must be used to capture this image',
|
|
190
198
|
notAllowedDocument: 'This document type is not allowed',
|
|
191
199
|
frontSide: 'Warning: <br/>Front of the document could not be read. <br/>Try taking a higher quality image',
|
|
200
|
+
default: 'We\'re sorry, but something went wrong. Please try again',
|
|
201
|
+
CameraNotFound: 'No camera was found on your device',
|
|
202
|
+
CameraNotAllowed: 'You have denied camera access permission',
|
|
203
|
+
CameraNotAvailable: 'Camera is not available at this moment',
|
|
204
|
+
CameraInUse: 'Camera is already in use',
|
|
205
|
+
MediaDevicesNotSupported: 'Your browser is not supported',
|
|
192
206
|
},
|
|
193
207
|
hintTexts: {
|
|
194
208
|
front: 'Position the front of the document',
|