@idscan/idvc2 2.5.8 → 2.5.10
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 +8 -0
- package/dist/css/idvc.css +1 -1
- package/dist/idvc.js +3 -3
- package/dist/index.html +13 -4
- package/dist/js/defaultConfig.ts +28 -3
- package/dist/js/environment/langs.js +1 -1
- package/dist/js/environment/stepsDescription.ts +14 -4
- package/dist/networks/190-0e4f-chunk.js +5 -0
- package/dist/networks/77-7273-chunk.js +5 -0
- package/dist/networks/Blur-a35a-chunk.js +1 -0
- package/dist/networks/ClassLocal-f57b-chunk.js +1 -0
- package/dist/networks/Face-7ab3-chunk.js +1 -0
- package/dist/networks/MRZ-2798-chunk.js +1 -0
- package/dist/networks/PDF-c6c7-chunk.js +5 -0
- package/dist/networks/{ZXing-f54a-chunk.js → ZXing-ce9f-chunk.js} +1 -1
- package/package.json +1 -1
- package/dist/networks/190-00d9-chunk.js +0 -1
- package/dist/networks/77-705c-chunk.js +0 -1
- package/dist/networks/Face-5c85-chunk.js +0 -1
- package/dist/networks/MRZ-70ee-chunk.js +0 -1
- package/dist/networks/PDF-4ee2-chunk.js +0 -1
package/dist/index.html
CHANGED
|
@@ -16,16 +16,17 @@
|
|
|
16
16
|
parsePDF: true,
|
|
17
17
|
realFaceMode: 'all', // none, auto, all
|
|
18
18
|
useCDN: false,
|
|
19
|
+
// hideDocumentTitle: true,
|
|
19
20
|
useHeic: false,
|
|
20
21
|
resizeUploadedImage: 2000,
|
|
21
|
-
isShowDocumentTypeSelect:
|
|
22
|
+
isShowDocumentTypeSelect: true,
|
|
22
23
|
isShowGuidelinesButton: true,
|
|
23
24
|
language: 'en',
|
|
24
25
|
documentTypes: [
|
|
25
26
|
{
|
|
26
27
|
type: 'ID',
|
|
27
28
|
steps:[
|
|
28
|
-
{ type: 'front', name: 'Document Front' },
|
|
29
|
+
// { type: 'front', name: 'Document Front' },
|
|
29
30
|
{ type: 'pdf', name: 'Document PDF417 Barcode' },
|
|
30
31
|
{ type: 'face', name: 'Face' },
|
|
31
32
|
],
|
|
@@ -45,11 +46,19 @@
|
|
|
45
46
|
{
|
|
46
47
|
type: 'Passport',
|
|
47
48
|
steps:[
|
|
48
|
-
{ type: 'front', name: 'Document Front' },
|
|
49
|
-
{ type: 'mrz', name: 'Passport
|
|
49
|
+
// { type: 'front', name: 'Document Front' },
|
|
50
|
+
{ type: 'mrz', name: 'Passport Back', mode: { uploader: true, video: true } },
|
|
50
51
|
{ type: 'face', name: 'Face', mode: { uploader: false, video: true } }
|
|
51
52
|
],
|
|
52
53
|
},
|
|
54
|
+
{
|
|
55
|
+
type: 'InternationalId',
|
|
56
|
+
steps:[
|
|
57
|
+
// { type: 'front', name: 'Document Front' },
|
|
58
|
+
{ type: 'back', name: 'Passport Back', mode: { uploader: true, video: true } },
|
|
59
|
+
// { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
|
|
60
|
+
],
|
|
61
|
+
},
|
|
53
62
|
],
|
|
54
63
|
clickGuidlines () {
|
|
55
64
|
console.log('clickGuidlines')
|
package/dist/js/defaultConfig.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ModalPositionKeys, modalPositions } from './environment/modalPosition';
|
|
|
6
6
|
|
|
7
7
|
export type ValidationFn = 'validateElement' | 'validateString' | 'validateDocumentTypes' | 'validateDistinctStringInArray' | 'validateNumber' | 'validateFunction' | 'validateBool';
|
|
8
8
|
type DefaultValueFunction = () => boolean;
|
|
9
|
+
export type NormalizedType = 'Path';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* { boolean? } uploader
|
|
@@ -28,6 +29,8 @@ export interface IDocumentType {
|
|
|
28
29
|
mode?: IStepMode,
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
type ImageURI = 'png' | 'jpeg' | 'webp';
|
|
33
|
+
|
|
31
34
|
export type DefaultConfigName = 'el'
|
|
32
35
|
| 'licenseKey'
|
|
33
36
|
| 'networkUrl'
|
|
@@ -42,6 +45,8 @@ export type DefaultConfigName = 'el'
|
|
|
42
45
|
| 'isShowDocumentTypeSelect'
|
|
43
46
|
| 'useCDN'
|
|
44
47
|
| 'useHeic'
|
|
48
|
+
| 'processingImageFormat'
|
|
49
|
+
| 'hideDocumentTitle'
|
|
45
50
|
| 'autoContinue'
|
|
46
51
|
| 'isShowGuidelinesButton'
|
|
47
52
|
| 'fixFrontOrientAfterUpload'
|
|
@@ -73,9 +78,10 @@ export interface IDefaultConfig {
|
|
|
73
78
|
defaultValue: IStepMode | string | boolean | DefaultValueFunction | number | IDocumentType[],
|
|
74
79
|
validationFn: ValidationFn,
|
|
75
80
|
hidden?: boolean,
|
|
76
|
-
values?: ModalPositionKeys[] | RealFaceMode[] | typeof supportedLanguages[number][],
|
|
81
|
+
values?: ModalPositionKeys[] | RealFaceMode[] | typeof supportedLanguages[number][] | ImageURI[],
|
|
77
82
|
arrayValues?: unknown[],
|
|
78
83
|
multiple?: boolean,
|
|
84
|
+
normalizedType?: NormalizedType,
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
/**
|
|
@@ -102,8 +108,9 @@ const defaultConfig: IDefaultConfig[] = [
|
|
|
102
108
|
name: 'networkUrl',
|
|
103
109
|
type: 'String',
|
|
104
110
|
description: 'Path to the folder with neural networks. Specify the path on the server if you need to remove the folder to another location. The default path is \'networks\'.',
|
|
105
|
-
defaultValue: 'networks',
|
|
111
|
+
defaultValue: 'networks/',
|
|
106
112
|
validationFn: 'validateString',
|
|
113
|
+
normalizedType: 'Path',
|
|
107
114
|
},
|
|
108
115
|
{
|
|
109
116
|
name: 'chunkPublicPath',
|
|
@@ -111,6 +118,7 @@ const defaultConfig: IDefaultConfig[] = [
|
|
|
111
118
|
description: 'Path to the folder with chunks. Specify the path on the server if you need to remove the folder to another location. The default path is \'networks\'.',
|
|
112
119
|
defaultValue: 'networks/',
|
|
113
120
|
validationFn: 'validateString',
|
|
121
|
+
normalizedType: 'Path',
|
|
114
122
|
},
|
|
115
123
|
{
|
|
116
124
|
name: 'language',
|
|
@@ -187,7 +195,7 @@ const defaultConfig: IDefaultConfig[] = [
|
|
|
187
195
|
{
|
|
188
196
|
name: 'isShowDocumentTypeSelect',
|
|
189
197
|
type: 'Boolean',
|
|
190
|
-
description: 'If
|
|
198
|
+
description: 'If this option is disabled, the library starts immediately with first configured document type.',
|
|
191
199
|
defaultValue: true,
|
|
192
200
|
validationFn: 'validateBool',
|
|
193
201
|
},
|
|
@@ -198,6 +206,13 @@ const defaultConfig: IDefaultConfig[] = [
|
|
|
198
206
|
defaultValue: false,
|
|
199
207
|
validationFn: 'validateBool',
|
|
200
208
|
},
|
|
209
|
+
{
|
|
210
|
+
name: 'hideDocumentTitle',
|
|
211
|
+
type: 'Boolean',
|
|
212
|
+
description: 'This option switches on/off the displaying document titles',
|
|
213
|
+
defaultValue: false,
|
|
214
|
+
validationFn: 'validateBool',
|
|
215
|
+
},
|
|
201
216
|
{
|
|
202
217
|
name: 'useHeic',
|
|
203
218
|
type: 'Boolean',
|
|
@@ -205,6 +220,16 @@ const defaultConfig: IDefaultConfig[] = [
|
|
|
205
220
|
defaultValue: false,
|
|
206
221
|
validationFn: 'validateBool',
|
|
207
222
|
},
|
|
223
|
+
{
|
|
224
|
+
name: 'processingImageFormat',
|
|
225
|
+
values: ['jpeg', 'png', 'webp'],
|
|
226
|
+
type: 'Array',
|
|
227
|
+
description: 'This option switches image format, that used for image processing',
|
|
228
|
+
defaultValue: 'webp',
|
|
229
|
+
validationFn: 'validateDistinctStringInArray',
|
|
230
|
+
arrayValues: ['jpeg', 'png', 'webp'],
|
|
231
|
+
multiple: false,
|
|
232
|
+
},
|
|
208
233
|
{
|
|
209
234
|
name: 'autoContinue',
|
|
210
235
|
type: 'Boolean',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var o in a)__webpack_require__.o(a,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:a[o]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a);var __webpack_exports__={};__webpack_require__.d(__webpack_exports__,{J3:()=>supportedLanguages,_2:()=>setTranslation,i0:()=>getTranslation});var supportedLanguages=["en","es"],labels={es:{errorCodes:{
|
|
1
|
+
var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var o in a)__webpack_require__.o(a,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:a[o]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a);var __webpack_exports__={};__webpack_require__.d(__webpack_exports__,{J3:()=>supportedLanguages,_2:()=>setTranslation,i0:()=>getTranslation});var supportedLanguages=["en","es"],labels={es:{errorCodes:{mrzNotFound:"Advertencia: <br/>MRZ no encontrado.",mrzNotRecognized:"Advertencia: <br/>No se han podido leer los datos MRZ.<br/>Intente tomar una imagen de mayor calidad.",barcodeNotFound:"Warning: <br/>C\xf3digo de barras no encontrado.",barcodeNotRecognized:"Advertencia: <br/>No se pudieron leer los datos del c\xf3digo de barras.",heic:"El archivo HEIC est\xe1 da\xf1ado",fileTypeHeic:"Error de tipo de archivo. Solo se admiten los tipos de archivo JPEG, PNG y HEIC.",fileType:"Error de tipo de archivo. Solo se admiten los tipos de archivo JPEG y PNG.",disableStepFileUpload:"Se debe utilizar un dispositivo con una c\xe1mara para capturar esta imagen",notAllowedDocument:"Este tipo de documento no est\xe1 permitido",documentSideLowPerimeter:"Advertencia: <br/>El documento de la foto es demasiado peque\xf1o, ac\xe9rcalo m\xe1s",frontSideNotDetected:"Advertencia: <br/>El anverso del documento no se reconoce como anverso",backSideNotDetected:"Advertencia: <br/>El anverso del documento no se reconoce como el reverso del documento",faceNotFound:"Advertencia: <br/>La cara no se encuentra",default:"Lo sentimos, pero algo sali\xf3 mal. Int\xe9ntalo de nuevo",CameraNotFound:"No se encontr\xf3 ninguna c\xe1mara en su dispositivo",CameraNotAllowed:"Se le ha denegado el permiso para acceder a la c\xe1mara",CameraNotAvailable:"La c\xe1mara no est\xe1 disponible en este momento",CameraInUse:"La c\xe1mara ya est\xe1 en uso",MediaDevicesNotSupported:"Tu navegador no es compatible",lowImageResolution:"La resoluci\xf3n de la imagen cargada es demasiado baja",imageIsBlurred:"La imagen aparece borrosa"},hintTexts:{front:"Coloque el anverso del documento",frontMRZ:"Haga zoom para capturar el c\xf3digo en la parte inferior",mrz:"Haga zoom para capturar el c\xf3digo en la parte posterior",capturing:"Coloque el anverso del documento",pdf:"Coloque el c\xf3digo de barras dentro del marco",back:"Da la vuelta a tu documento",barcode:"Coloque el c\xf3digo de barras dentro del marco",hold:"Sostener el **placeholder** lado del documento <br> dentro de la caja",dontSee:"No te veo",dontMove:"No te muevas",turnFaceLeft:"Gira la cara a la izquierda",turnFaceRight:"Gira la cara a la derecha",turnFaceUp:"Levanta tu cara",turnFaceDown:"Bajar la cara",faceCam:"Enfr\xe9ntate a la c\xe1mara",camAway:"Mover la c\xe1mara m\xe1s lejos",moveCenter:"Mover al centro",comeCloser:"Ac\xe9rcate",documentCloser:"Acerque el documento",holdCamera:"Mant\xe9ngase firme, analizando el documento <br>"},keyErrors:["La clave de licencia ha caducado","Clave de licencia no v\xe1lida"],camera:{loading:"Carga",awaiting:"A la espera de la respuesta de la c\xe1mara"},general:{documentType:"Su Tipo de Documento es",selectDocumentTypeText:"Seleccionar Tipo de Documento",changeBtn:"Cambiar",correctBtn:"Corregir",cancelBtn:"Cancelar",doneBtn:"Hecho",closeBtn:"Cerrar",retakeBtn:"VOLVER",continueBtn:"CONTINUAR",submitBtn:"ENVIAR",resetAllStepsBtn:"Restablecer todos los pasos",btnUploader:"Cambiar a cargador manual",btnCamera:"Cambiar al modo de c\xe1mara",pressToUpdateText:"Pulse para actualizar",pressToUpdateTextSuccess:"Pulse para actualizar"},uploaderDescription:{textFront:"Haga clic aqu\xed para cargar el frente de su identificaci\xf3n",textBack:"Haga clic aqu\xed para cargar el reverso de una identificaci\xf3n",textFace:"Haga clic aqu\xed para cargar una foto de su rostro",textPdf:"Haga clic aqu\xed para cargar el reverso de una identificaci\xf3n",textMrz:"Haga clic aqu\xed para cargar una foto de su documento'",textFrontBack:"Aseg\xfarese de que su identificaci\xf3n llene toda la pantalla de la c\xe1mara con poco o ning\xfan fondo.",textPass:"Aseg\xfarese de que su identificaci\xf3n llene toda la pantalla de la c\xe1mara <br> con poco o ning\xfan fondo, y que se incluya el c\xf3digo MRZ completo",textFacePosition:"Coloque su rostro para ocupar toda la pantalla de la c\xe1mara con poco o ning\xfan fondo."},documentsTypes:{ID:"Licencia de Conducir",Passport:"Pasaporte",PassportCard:"Tarjeta de Pasaporte",GreenCard:"Tarjeta Verde o Autorizaci\xf3n de Empleo",InternationalId:"Identificaci\xf3n Internacional"},spinnerText:{warmup:{top:"La red neuronal se est\xe1 calentando",bottom:"La captura de documentos estar\xe1 lista para su uso en breve"}}},en:{errorCodes:{mrzNotFound:"Warning: <br/>MRZ not found.",mrzNotRecognized:"Warning: <br/>MRZ data could not be read.<br/>Try taking a higher quality image.",barcodeNotFound:"Warning: <br/>Barcode not found.",barcodeNotRecognized:"Warning: <br/>Barcode data could not be read.",heic:"HEIC file incorrupted",fileType:"Error file type. Only jpeg and png supported.",fileTypeHeic:"Error file type. Only jpeg, png and heic supported.",disableStepFileUpload:"A device with a camera must be used to capture this image",notAllowedDocument:"This document type is not allowed",documentSideLowPerimeter:"Warning: <br/>The document in the photo is too small, bring it closer",frontSideNotDetected:"Warning: <br/>The document's side isn't recognized as the front side.",backSideNotDetected:"Warning: <br/>The document's side isn't recognized as the back side.",faceNotFound:"Warning: <br/>The face is not found.",default:"We're sorry, but something went wrong. Please try again",CameraNotFound:"No camera was found on your device",CameraNotAllowed:"You have denied camera access permission",CameraNotAvailable:"Camera is not available at this moment",CameraInUse:"Camera is already in use",MediaDevicesNotSupported:"Your browser is not supported",lowImageResolution:"The resolution of the uploaded image is too low",imageIsBlurred:"The image is blurred"},hintTexts:{front:"Position the front of the document",frontMRZ:"Zoom in to capture code at bottom",mrz:"Zoom in to capture code on back side",capturing:"Position the front of the document",pdf:"Position the barcode inside the frame",back:"Turn around your document",barcode:"Position the barcode inside the frame",hold:"Hold the **placeholder** side of the document <br> inside the box",dontSee:"I don't see you",dontMove:"Don't move",turnFaceLeft:"Turn your face left",turnFaceRight:"Turn your face right",turnFaceUp:"Turn your face up",turnFaceDown:"Turn your face down",faceCam:"Face the camera",camAway:"Move camera further away",moveCenter:"Move to the center",comeCloser:"Come closer",documentCloser:"Bring the document closer",holdCamera:"Hold steady, analyzing document <br>"},keyErrors:["License Key has expired","Invalid License Key"],camera:{loading:"Loading",awaiting:"Awaiting camera response"},general:{documentType:"Your document type is",selectDocumentTypeText:"Select Document Type",changeBtn:"Change",correctBtn:"Correct",cancelBtn:"Cancel",doneBtn:"Done",closeBtn:"CLOSE",retakeBtn:"Retake",continueBtn:"CONTINUE",submitBtn:"SUBMIT",resetAllStepsBtn:"Reset all steps",btnUploader:"Switch to manual uploader",btnCamera:"Switch to camera mode",pressToUpdateText:"Press to update",pressToUpdateTextSuccess:"Press to update"},documentsTypes:{ID:"Driver's License",Passport:"Passport",PassportCard:"Passport Card",GreenCard:"Green Card or Employment Authorization",InternationalId:"International ID"},uploaderDescription:{textFront:"Click here to upload the front of your ID",textBack:"Click here to upload the back of your ID",textFace:"Click here to upload a photo of your face",textPdf:"Click here to upload the back of a ID",textMrz:"Click here to upload a photo of your document",textFrontBack:"Please make sure your ID fills up the entire <br> camera screen with little to no background.",textPass:"Please make sure your ID fills up the entire camera screen <br> with little to no background, and the full MRZ code is included.",textFacePosition:"Please position your face to take up <br> the full camera screen with little to no background."},spinnerText:{warmup:{top:"Neural network is warming up",bottom:"Document capture will be ready to use shortly"}}}},translation=labels.en,setTranslation=function(e){if(e){var a=e.toLowerCase(),o=Object.keys(labels).includes(a)?a:"en";translation=labels[o]}else translation=labels.en},getTranslation=function(e){return e?translation[e]:translation},__webpack_exports__getTranslation=__webpack_exports__.i0,__webpack_exports__setTranslation=__webpack_exports__._2,__webpack_exports__supportedLanguages=__webpack_exports__.J3;export{__webpack_exports__getTranslation as getTranslation,__webpack_exports__setTranslation as setTranslation,__webpack_exports__supportedLanguages as supportedLanguages};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type StepType = 'mrz' | 'front' | 'pdf' | 'face' | 'barcode' | 'photo';
|
|
1
|
+
export type StepType = 'mrz' | 'front' | 'pdf' | 'face' | 'barcode' | 'photo' | 'back';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
mrz: {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: 'MRZ',
|
|
8
8
|
time: 5,
|
|
9
9
|
core: [
|
|
10
|
-
'mrz',
|
|
10
|
+
'mrz', 'blur',
|
|
11
11
|
],
|
|
12
12
|
description: 'detection, capture and parsing of the mrz-code of a document.',
|
|
13
13
|
},
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
time: 5,
|
|
19
19
|
max: 0.15,
|
|
20
20
|
core: [
|
|
21
|
-
'front', 'classLocal',
|
|
21
|
+
'front', 'classLocal', 'blur',
|
|
22
22
|
],
|
|
23
23
|
description: 'capture front of a document without analysis.',
|
|
24
24
|
},
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
name: 'PDF',
|
|
29
29
|
time: 5,
|
|
30
30
|
core: [
|
|
31
|
-
'pdf', 'classLocal',
|
|
31
|
+
'pdf', 'classLocal', 'blur',
|
|
32
32
|
],
|
|
33
33
|
description: 'detection and capture of pdf417 of a document.',
|
|
34
34
|
},
|
|
@@ -61,4 +61,14 @@ export default {
|
|
|
61
61
|
core: [],
|
|
62
62
|
description: 'Take a photo.',
|
|
63
63
|
},
|
|
64
|
+
back: {
|
|
65
|
+
id: 8,
|
|
66
|
+
camera: 'environment',
|
|
67
|
+
name: 'Document Back',
|
|
68
|
+
time: 5,
|
|
69
|
+
core: [
|
|
70
|
+
'mrz', 'pdf', 'classLocal', 'blur',
|
|
71
|
+
],
|
|
72
|
+
description: 'detection and capture information from back side of the document',
|
|
73
|
+
},
|
|
64
74
|
};
|