@idscan/idvc2 2.2.2 → 2.2.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.
Files changed (41) hide show
  1. package/LICENSE.txt +202 -202
  2. package/README.md +158 -156
  3. package/dist/idvc.js +1 -1
  4. package/dist/index.html +95 -95
  5. package/dist/js/defaultConfig.ts +254 -254
  6. package/dist/js/environment/capturingModes.json +4 -4
  7. package/dist/js/environment/cssVariables.json +191 -191
  8. package/dist/js/environment/designations.ts +19 -19
  9. package/dist/js/environment/documentTypes.ts +145 -145
  10. package/dist/js/environment/langs.ts +293 -293
  11. package/dist/js/environment/loadModes.json +11 -11
  12. package/dist/js/environment/loopResult.ts +14 -14
  13. package/dist/js/environment/networkNames.json +20 -20
  14. package/dist/js/environment/realFaceModes.ts +15 -15
  15. package/dist/js/environment/stepsDescription.ts +85 -85
  16. package/dist/js/environment/triangulation.ts +188 -188
  17. package/dist/js/geometry.d.ts +8 -8
  18. package/dist/js/idvc.d.ts +3 -3
  19. package/dist/js/image.d.ts +4 -4
  20. package/dist/js/index.d.ts +12 -12
  21. package/dist/js/loop.d.ts +21 -21
  22. package/dist/js/mrz.d.ts +105 -105
  23. package/dist/networks/{130.0b466182.js → 130.f9cf8b7f.js} +0 -0
  24. package/dist/networks/{215.bf164218.js → 215.d4dcf9f8.js} +0 -0
  25. package/dist/networks/{400.8e839581.js → 400.c10b35da.js} +0 -0
  26. package/dist/networks/716.0ae8557d.js +1 -0
  27. package/dist/networks/{Face.728ec3c6.js → Face.caf8a3ec.js} +0 -0
  28. package/dist/networks/{MRZ.16515b82.js → MRZ.4736053a.js} +0 -0
  29. package/dist/networks/{PDF.04105754.js → PDF.e3b27d00.js} +0 -0
  30. package/dist/networks/{ZXing.d5fea691.js → ZXing.ccc17251.js} +0 -0
  31. package/dist/networks/angles20210831.json +1 -1
  32. package/dist/networks/asyncLoader.9bf3066b.js +1 -0
  33. package/dist/networks/cdnLoader.edab76a1.js +1 -0
  34. package/dist/networks/classLocal20220112.json +1 -1
  35. package/dist/networks/detectormodel20220817.json +1 -1
  36. package/dist/networks/landmarkmodel20220817.json +1 -1
  37. package/dist/networks/mrz20220531.json +1953 -1953
  38. package/package.json +4 -4
  39. package/dist/networks/716.7c63165d.js +0 -1
  40. package/dist/networks/asyncLoader.c80a6980.js +0 -1
  41. package/dist/networks/cdnLoader.64c17c7d.js +0 -1
@@ -1,254 +1,254 @@
1
- import realFaceModes, { RealFaceMode } from './environment/realFaceModes';
2
- import { DocumentTypeName } from './environment/documentTypes';
3
- import { StepType } from './environment/stepsDescription';
4
-
5
- export type ValidationFn = 'validateElement' | 'validateString' | 'validateDocumentTypes' | 'validateDistinctStringInArray' | 'validateNumber' | 'validateFunction' | 'validateBool' | 'validateLanguage';
6
- type DefaultValueFunction = () => boolean;
7
-
8
- /**
9
- * { boolean? } uploader
10
- * { boolean? } video
11
- */
12
- export interface IStepMode {
13
- uploader?: boolean,
14
- video?: boolean,
15
- }
16
- export type IStepModeKeys = keyof IStepMode;
17
- export interface IStepConfig {
18
- type: StepType,
19
- name: string,
20
- mode: IStepMode,
21
- }
22
-
23
- export interface IDocumentType {
24
- type: DocumentTypeName,
25
- steps: IStepConfig[],
26
- mode?: IStepMode,
27
- }
28
-
29
- /**
30
- * IDefaultConfig
31
- * @param {string} name,
32
- * @param {'String' | 'Array' | 'Number' | 'Boolean' | 'Function' | 'Object'} type,
33
- * @param {string} description,
34
- * @param {string | boolean | DefaultValueFunction | number | IDocumentType[]} defaultValue,
35
- * @param {ValidationFn} validationFn,
36
- * @parma {boolean} hidden?,
37
- * @param {RealFaceMode[]} values?,
38
- * @param {any[]} arrayValues,
39
- * @param {boolean} multiple?,
40
- */
41
- export interface IDefaultConfig {
42
- name: string,
43
- type: 'String' | 'Array' | 'Number' | 'Boolean' | 'Function' | 'Object',
44
- description: string,
45
- defaultValue: IStepMode | string | boolean | DefaultValueFunction | number | IDocumentType[],
46
- validationFn: ValidationFn,
47
- hidden?: boolean,
48
- values?: RealFaceMode[],
49
- arrayValues?: any[],
50
- multiple?: boolean,
51
- }
52
-
53
- /**
54
- * @param {String} name - config param name
55
- * @param {any} defaultValue - value to fallback
56
- * @param {String} validationFn - name of validation function from Config module
57
- */
58
- const defaultConfig: IDefaultConfig[] = [
59
- {
60
- name: 'el',
61
- type: 'String',
62
- description: 'Id of an element on the page where the component will be integrated.',
63
- defaultValue: 'videoCapturingEl',
64
- validationFn: 'validateElement',
65
- },
66
- {
67
- name: 'licenseKey',
68
- type: 'String',
69
- description: 'Key for the library',
70
- defaultValue: '',
71
- validationFn: 'validateString',
72
- },
73
- {
74
- name: 'networkUrl',
75
- type: 'String',
76
- 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\'.',
77
- defaultValue: 'networks',
78
- validationFn: 'validateString',
79
- },
80
- {
81
- name: 'language',
82
- type: 'String',
83
- description: 'The option sets the language used for the translation of the text in the library',
84
- defaultValue: undefined,
85
- validationFn: 'validateLanguage',
86
- },
87
- {
88
- name: 'documentTypes',
89
- type: 'Array',
90
- description: 'The option that describes what steps needs for each document type you are needed',
91
- defaultValue: [{
92
- type: 'ID',
93
- steps: [
94
- {
95
- type: 'front', name: 'Document Front', mode: { uploader: true, video: true },
96
- },
97
- {
98
- type: 'pdf', name: 'Document PDF417 Barcode', mode: { uploader: true, video: true },
99
- },
100
- {
101
- type: 'face', name: 'Face', mode: { uploader: true, video: true },
102
- },
103
- ],
104
- }],
105
- validationFn: 'validateDocumentTypes',
106
- },
107
- {
108
- name: 'realFaceMode',
109
- values: ['auto', 'none', 'all'],
110
- type: 'Array',
111
- description: 'Option that enable advanced capture with volumetric face detection. Available values: \'auto\', \'none\'. Auto - enable "realFaceMode" only for iphone. All - enable "realFaceMode" for all devices. None - disable this option.',
112
- defaultValue: 'auto',
113
- validationFn: 'validateDistinctStringInArray',
114
- arrayValues: Object.keys(realFaceModes),
115
- multiple: false,
116
- },
117
- {
118
- name: 'resizeUploadedImage',
119
- type: 'Number',
120
- description: 'Sets the maximum size for manually loaded pictures.',
121
- defaultValue: -1,
122
- validationFn: 'validateNumber',
123
- },
124
- {
125
- name: 'h_showSubmitBtn',
126
- type: 'Boolean',
127
- description: 'This option enables/disables the "submit" button after capturing all the images',
128
- defaultValue: true,
129
- hidden: true,
130
- validationFn: 'validateBool',
131
- },
132
- {
133
- name: 'h_stepMode',
134
- type: 'Object',
135
- description: 'Default value for step mode (video/uploader)',
136
- defaultValue: { uploader: true, video: true },
137
- hidden: true,
138
- validationFn: null,
139
- },
140
- {
141
- name: 'isShowDocumentTypeSelect',
142
- type: 'Boolean',
143
- description: 'If only one document type is in the config and this option is disabled, the library starts immediately.',
144
- defaultValue: true,
145
- validationFn: 'validateBool',
146
- },
147
- {
148
- name: 'useCDN',
149
- type: 'Boolean',
150
- description: 'Set to true if you prefer to load neural networks from cdn instead of your domain.',
151
- defaultValue: false,
152
- validationFn: 'validateBool',
153
- },
154
- {
155
- name: 'useHeic',
156
- type: 'Boolean',
157
- description: 'This option switches on/off the HEIC images processing (HEIC is Apple’s proprietary version of the Image File format). It’s possible to upload only via a Mac/MacBook.',
158
- defaultValue: false,
159
- validationFn: 'validateBool',
160
- },
161
- {
162
- name: 'autoContinue',
163
- type: 'Boolean',
164
- description: 'This option switches on/off the automatic transition to the next step.',
165
- defaultValue: true,
166
- validationFn: 'validateBool',
167
- },
168
- {
169
- name: 'isShowGuidelinesButton',
170
- type: 'Boolean',
171
- description: 'Switches on the button show guidLines',
172
- defaultValue: false,
173
- validationFn: 'validateBool',
174
- },
175
- {
176
- name: 'fixFrontOrientAfterUpload',
177
- type: 'Boolean',
178
- description: 'This option provides the possibility to adjust the correct position of the document in case of manual uploading.',
179
- defaultValue: false,
180
- validationFn: 'validateBool',
181
- },
182
- {
183
- name: 'isSubmitMetaData',
184
- type: 'Boolean',
185
- description: '',
186
- defaultValue: true,
187
- validationFn: 'validateBool',
188
- },
189
- {
190
- name: 'onChange',
191
- type: 'Function',
192
- description: 'Callback-function which will be called after change one step. The returnable value is the object with the type and the image',
193
- defaultValue() {
194
- return true;
195
- },
196
- validationFn: 'validateFunction',
197
- },
198
- {
199
- name: 'clickGuidlines',
200
- type: 'Function',
201
- description: 'Callback-function which will be called after guidLines button.',
202
- defaultValue() {
203
- return true;
204
- },
205
- validationFn: 'validateFunction',
206
- },
207
- {
208
- name: 'onReset',
209
- type: 'Function',
210
- description: 'Callback-function which will be called after reset all the steps. The returnable value is the object with the steps',
211
- defaultValue() {
212
- return true;
213
- },
214
- validationFn: 'validateFunction',
215
- },
216
- {
217
- name: 'submit',
218
- type: 'Function',
219
- description: 'Callback-function which will be called after completing all the steps.',
220
- defaultValue() {
221
- return true;
222
- },
223
- validationFn: 'validateFunction',
224
- },
225
- {
226
- name: 'onRetakeHook',
227
- type: 'Function',
228
- description: 'The function that will be called before reset the current step. The returnable value is the object with the current step',
229
- defaultValue() {
230
- return true;
231
- },
232
- validationFn: 'validateFunction',
233
- },
234
- {
235
- name: 'onCameraError',
236
- type: 'Function',
237
- description: 'The function that is invoked in case if the camera is not available. The response value is the object with the error code and the message',
238
- defaultValue() {
239
- return true;
240
- },
241
- validationFn: 'validateFunction',
242
- },
243
- {
244
- name: 'onMounted',
245
- type: 'Function',
246
- description: 'the function that will be called on the component mounted. This function doesn\'t return a value.',
247
- defaultValue() {
248
- return true;
249
- },
250
- validationFn: 'validateFunction',
251
- },
252
- ];
253
-
254
- export default defaultConfig;
1
+ import realFaceModes, { RealFaceMode } from './environment/realFaceModes';
2
+ import { DocumentTypeName } from './environment/documentTypes';
3
+ import { StepType } from './environment/stepsDescription';
4
+
5
+ export type ValidationFn = 'validateElement' | 'validateString' | 'validateDocumentTypes' | 'validateDistinctStringInArray' | 'validateNumber' | 'validateFunction' | 'validateBool' | 'validateLanguage';
6
+ type DefaultValueFunction = () => boolean;
7
+
8
+ /**
9
+ * { boolean? } uploader
10
+ * { boolean? } video
11
+ */
12
+ export interface IStepMode {
13
+ uploader?: boolean,
14
+ video?: boolean,
15
+ }
16
+ export type IStepModeKeys = keyof IStepMode;
17
+ export interface IStepConfig {
18
+ type: StepType,
19
+ name: string,
20
+ mode: IStepMode,
21
+ }
22
+
23
+ export interface IDocumentType {
24
+ type: DocumentTypeName,
25
+ steps: IStepConfig[],
26
+ mode?: IStepMode,
27
+ }
28
+
29
+ /**
30
+ * IDefaultConfig
31
+ * @param {string} name,
32
+ * @param {'String' | 'Array' | 'Number' | 'Boolean' | 'Function' | 'Object'} type,
33
+ * @param {string} description,
34
+ * @param {string | boolean | DefaultValueFunction | number | IDocumentType[]} defaultValue,
35
+ * @param {ValidationFn} validationFn,
36
+ * @parma {boolean} hidden?,
37
+ * @param {RealFaceMode[]} values?,
38
+ * @param {any[]} arrayValues,
39
+ * @param {boolean} multiple?,
40
+ */
41
+ export interface IDefaultConfig {
42
+ name: string,
43
+ type: 'String' | 'Array' | 'Number' | 'Boolean' | 'Function' | 'Object',
44
+ description: string,
45
+ defaultValue: IStepMode | string | boolean | DefaultValueFunction | number | IDocumentType[],
46
+ validationFn: ValidationFn,
47
+ hidden?: boolean,
48
+ values?: RealFaceMode[],
49
+ arrayValues?: any[],
50
+ multiple?: boolean,
51
+ }
52
+
53
+ /**
54
+ * @param {String} name - config param name
55
+ * @param {any} defaultValue - value to fallback
56
+ * @param {String} validationFn - name of validation function from Config module
57
+ */
58
+ const defaultConfig: IDefaultConfig[] = [
59
+ {
60
+ name: 'el',
61
+ type: 'String',
62
+ description: 'Id of an element on the page where the component will be integrated.',
63
+ defaultValue: 'videoCapturingEl',
64
+ validationFn: 'validateElement',
65
+ },
66
+ {
67
+ name: 'licenseKey',
68
+ type: 'String',
69
+ description: 'Key for the library',
70
+ defaultValue: '',
71
+ validationFn: 'validateString',
72
+ },
73
+ {
74
+ name: 'networkUrl',
75
+ type: 'String',
76
+ 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\'.',
77
+ defaultValue: 'networks',
78
+ validationFn: 'validateString',
79
+ },
80
+ {
81
+ name: 'language',
82
+ type: 'String',
83
+ description: 'The option sets the language used for the translation of the text in the library',
84
+ defaultValue: undefined,
85
+ validationFn: 'validateLanguage',
86
+ },
87
+ {
88
+ name: 'documentTypes',
89
+ type: 'Array',
90
+ description: 'The option that describes what steps needs for each document type you are needed',
91
+ defaultValue: [{
92
+ type: 'ID',
93
+ steps: [
94
+ {
95
+ type: 'front', name: 'Document Front', mode: { uploader: true, video: true },
96
+ },
97
+ {
98
+ type: 'pdf', name: 'Document PDF417 Barcode', mode: { uploader: true, video: true },
99
+ },
100
+ {
101
+ type: 'face', name: 'Face', mode: { uploader: true, video: true },
102
+ },
103
+ ],
104
+ }],
105
+ validationFn: 'validateDocumentTypes',
106
+ },
107
+ {
108
+ name: 'realFaceMode',
109
+ values: ['auto', 'none', 'all'],
110
+ type: 'Array',
111
+ description: 'Option that enable advanced capture with volumetric face detection. Available values: \'auto\', \'none\'. Auto - enable "realFaceMode" only for iphone. All - enable "realFaceMode" for all devices. None - disable this option.',
112
+ defaultValue: 'auto',
113
+ validationFn: 'validateDistinctStringInArray',
114
+ arrayValues: Object.keys(realFaceModes),
115
+ multiple: false,
116
+ },
117
+ {
118
+ name: 'resizeUploadedImage',
119
+ type: 'Number',
120
+ description: 'Sets the maximum size for manually loaded pictures.',
121
+ defaultValue: -1,
122
+ validationFn: 'validateNumber',
123
+ },
124
+ {
125
+ name: 'h_showSubmitBtn',
126
+ type: 'Boolean',
127
+ description: 'This option enables/disables the "submit" button after capturing all the images',
128
+ defaultValue: true,
129
+ hidden: true,
130
+ validationFn: 'validateBool',
131
+ },
132
+ {
133
+ name: 'h_stepMode',
134
+ type: 'Object',
135
+ description: 'Default value for step mode (video/uploader)',
136
+ defaultValue: { uploader: true, video: true },
137
+ hidden: true,
138
+ validationFn: null,
139
+ },
140
+ {
141
+ name: 'isShowDocumentTypeSelect',
142
+ type: 'Boolean',
143
+ description: 'If only one document type is in the config and this option is disabled, the library starts immediately.',
144
+ defaultValue: true,
145
+ validationFn: 'validateBool',
146
+ },
147
+ {
148
+ name: 'useCDN',
149
+ type: 'Boolean',
150
+ description: 'Set to true if you prefer to load neural networks from cdn instead of your domain.',
151
+ defaultValue: false,
152
+ validationFn: 'validateBool',
153
+ },
154
+ {
155
+ name: 'useHeic',
156
+ type: 'Boolean',
157
+ description: 'This option switches on/off the HEIC images processing (HEIC is Apple’s proprietary version of the Image File format). It’s possible to upload only via a Mac/MacBook.',
158
+ defaultValue: false,
159
+ validationFn: 'validateBool',
160
+ },
161
+ {
162
+ name: 'autoContinue',
163
+ type: 'Boolean',
164
+ description: 'This option switches on/off the automatic transition to the next step.',
165
+ defaultValue: true,
166
+ validationFn: 'validateBool',
167
+ },
168
+ {
169
+ name: 'isShowGuidelinesButton',
170
+ type: 'Boolean',
171
+ description: 'Switches on the button show guidLines',
172
+ defaultValue: false,
173
+ validationFn: 'validateBool',
174
+ },
175
+ {
176
+ name: 'fixFrontOrientAfterUpload',
177
+ type: 'Boolean',
178
+ description: 'This option provides the possibility to adjust the correct position of the document in case of manual uploading.',
179
+ defaultValue: false,
180
+ validationFn: 'validateBool',
181
+ },
182
+ {
183
+ name: 'isSubmitMetaData',
184
+ type: 'Boolean',
185
+ description: '',
186
+ defaultValue: true,
187
+ validationFn: 'validateBool',
188
+ },
189
+ {
190
+ name: 'onChange',
191
+ type: 'Function',
192
+ description: 'Callback-function which will be called after change one step. The returnable value is the object with the type and the image',
193
+ defaultValue() {
194
+ return true;
195
+ },
196
+ validationFn: 'validateFunction',
197
+ },
198
+ {
199
+ name: 'clickGuidlines',
200
+ type: 'Function',
201
+ description: 'Callback-function which will be called after guidLines button.',
202
+ defaultValue() {
203
+ return true;
204
+ },
205
+ validationFn: 'validateFunction',
206
+ },
207
+ {
208
+ name: 'onReset',
209
+ type: 'Function',
210
+ description: 'Callback-function which will be called after reset all the steps. The returnable value is the object with the steps',
211
+ defaultValue() {
212
+ return true;
213
+ },
214
+ validationFn: 'validateFunction',
215
+ },
216
+ {
217
+ name: 'submit',
218
+ type: 'Function',
219
+ description: 'Callback-function which will be called after completing all the steps.',
220
+ defaultValue() {
221
+ return true;
222
+ },
223
+ validationFn: 'validateFunction',
224
+ },
225
+ {
226
+ name: 'onRetakeHook',
227
+ type: 'Function',
228
+ description: 'The function that will be called before reset the current step. The returnable value is the object with the current step',
229
+ defaultValue() {
230
+ return true;
231
+ },
232
+ validationFn: 'validateFunction',
233
+ },
234
+ {
235
+ name: 'onCameraError',
236
+ type: 'Function',
237
+ description: 'The function that is invoked in case if the camera is not available. The response value is the object with the error code and the message',
238
+ defaultValue() {
239
+ return true;
240
+ },
241
+ validationFn: 'validateFunction',
242
+ },
243
+ {
244
+ name: 'onMounted',
245
+ type: 'Function',
246
+ description: 'the function that will be called on the component mounted. This function doesn\'t return a value.',
247
+ defaultValue() {
248
+ return true;
249
+ },
250
+ validationFn: 'validateFunction',
251
+ },
252
+ ];
253
+
254
+ export default defaultConfig;
@@ -1,4 +1,4 @@
1
- {
2
- "0": "processImage4",
3
- "1": "processImage5"
4
- }
1
+ {
2
+ "0": "processImage4",
3
+ "1": "processImage5"
4
+ }