@idscan/idvc2 2.4.2 → 2.4.3

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/dist/index.html CHANGED
@@ -15,7 +15,7 @@
15
15
  fixFrontOrientAfterUpload: false,
16
16
  parsePDF: true,
17
17
  realFaceMode: 'all', // none, auto, all
18
- useCDN: true,
18
+ useCDN: false,
19
19
  useHeic: false,
20
20
  isSubmitMetaData: true,
21
21
  resizeUploadedImage: 2000,
@@ -26,10 +26,10 @@
26
26
  {
27
27
  type: 'ID',
28
28
  steps:[
29
- { type: 'front', name: 'Document Front', mode: { uploader: true, video: true } },
29
+ { type: 'front', name: 'Document Front' },
30
30
  { type: 'pdf', name: 'Document PDF417 Barcode', mode: { uploader: true, video: true } },
31
31
  { type: 'face', name: 'Face', mode: { uploader: true, video: true } },
32
- // { type: 'mrz', name: 'Document MRZ', mode: { uploader: true, video: true } },
32
+ { type: 'mrz', name: 'Document MRZ', mode: { uploader: true, video: true } },
33
33
  ],
34
34
  },
35
35
  // {
@@ -0,0 +1,3 @@
1
+ export type PartialRecord <T extends string, U> = {
2
+ [V in T]?: U
3
+ };
@@ -1,8 +1,9 @@
1
1
  import realFaceModes, { RealFaceMode } from './environment/realFaceModes';
2
2
  import { DocumentTypeName } from './environment/documentTypes';
3
3
  import { StepType } from './environment/stepsDescription';
4
+ import { supportedLanguages } from './environment/langs';
4
5
 
5
- export type ValidationFn = 'validateElement' | 'validateString' | 'validateDocumentTypes' | 'validateDistinctStringInArray' | 'validateNumber' | 'validateFunction' | 'validateBool' | 'validateLanguage';
6
+ export type ValidationFn = 'validateElement' | 'validateString' | 'validateDocumentTypes' | 'validateDistinctStringInArray' | 'validateNumber' | 'validateFunction' | 'validateBool';
6
7
  type DefaultValueFunction = () => boolean;
7
8
 
8
9
  /**
@@ -26,6 +27,31 @@ export interface IDocumentType {
26
27
  mode?: IStepMode,
27
28
  }
28
29
 
30
+ export type DefaultConfigName = 'el'
31
+ | 'licenseKey'
32
+ | 'networkUrl'
33
+ | 'chunkPublicPath'
34
+ | 'language'
35
+ | 'documentTypes'
36
+ | 'realFaceMode'
37
+ | 'resizeUploadedImage'
38
+ | 'showSubmitBtn'
39
+ | 'h_stepMode'
40
+ | 'isShowDocumentTypeSelect'
41
+ | 'useCDN'
42
+ | 'useHeic'
43
+ | 'autoContinue'
44
+ | 'isShowGuidelinesButton'
45
+ | 'fixFrontOrientAfterUpload'
46
+ | 'isSubmitMetaData'
47
+ | 'onChange'
48
+ | 'clickGuidlines'
49
+ | 'onReset'
50
+ | 'submit'
51
+ | 'onRetakeHook'
52
+ | 'onCameraError'
53
+ | 'onMounted';
54
+
29
55
  /**
30
56
  * IDefaultConfig
31
57
  * @param {string} name,
@@ -39,13 +65,13 @@ export interface IDocumentType {
39
65
  * @param {boolean} multiple?,
40
66
  */
41
67
  export interface IDefaultConfig {
42
- name: string,
68
+ name: DefaultConfigName,
43
69
  type: 'String' | 'Array' | 'Number' | 'Boolean' | 'Function' | 'Object',
44
70
  description: string,
45
71
  defaultValue: IStepMode | string | boolean | DefaultValueFunction | number | IDocumentType[],
46
72
  validationFn: ValidationFn,
47
73
  hidden?: boolean,
48
- values?: RealFaceMode[],
74
+ values?: RealFaceMode[] | typeof supportedLanguages[number][],
49
75
  arrayValues?: any[],
50
76
  multiple?: boolean,
51
77
  }
@@ -86,10 +112,13 @@ const defaultConfig: IDefaultConfig[] = [
86
112
  },
87
113
  {
88
114
  name: 'language',
89
- type: 'String',
115
+ values: Array.from(supportedLanguages),
116
+ type: 'Array',
90
117
  description: 'The option sets the language used for the translation of the text in the library',
91
- defaultValue: undefined,
92
- validationFn: 'validateLanguage',
118
+ defaultValue: 'en',
119
+ validationFn: 'validateDistinctStringInArray',
120
+ arrayValues: Array.from(supportedLanguages),
121
+ multiple: false,
93
122
  },
94
123
  {
95
124
  name: 'documentTypes',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/idvc2",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "component for the capturing documents",
5
5
  "main": "dist/idvc.js",
6
6
  "files": [