@idscan/idvc2 2.1.0 → 2.1.1
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 +3 -0
- package/dist/js/environment/langs.ts +26 -12
- package/dist/js/idvc.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -391,6 +391,9 @@ The component has the following customizable properties:
|
|
|
391
391
|
- description of capture progress
|
|
392
392
|
|
|
393
393
|
## Version history
|
|
394
|
+
- **2.1.1**
|
|
395
|
+
- updated camera module
|
|
396
|
+
- improved camera errors handling
|
|
394
397
|
- **2.1.0**
|
|
395
398
|
- removed additional fonts
|
|
396
399
|
- 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',
|