@idscan/onboarding 2.0.19 → 2.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/onboarding",
3
- "version": "2.0.19",
3
+ "version": "2.0.21",
4
4
  "description": "Wrapper of the IDVC library for DVS Online.",
5
5
  "main": "dist/js/wrapper.js",
6
6
  "files": [
@@ -11,7 +11,8 @@
11
11
  "build": "webpack build --mode development --progress --stats-children",
12
12
  "prod": "webpack build --mode production --progress --stats-children",
13
13
  "pack": "npm pack",
14
- "patch": "npm version patch"
14
+ "patch": "npm version patch",
15
+ "minor": "npm version minor"
15
16
  },
16
17
  "dependencies": {
17
18
  "@idscan/idvc2": "2.3.0",
package/readme.md ADDED
@@ -0,0 +1,264 @@
1
+ ## Overview
2
+
3
+ Wrapper of the IDVC library for DVS Online.
4
+
5
+ ## Use cases
6
+
7
+ - Capture and determination of the document type
8
+ - Capture of pdf417
9
+ - Capture of MRZ
10
+ - Capture of faces
11
+
12
+ ## Recommendations
13
+
14
+ Use a modern phone with a good camera having the definition of not less than 8 megapixels.
15
+ The capture must be made in a well-lighted room. A document must be located at the uniform background.
16
+
17
+ ## Limitations
18
+
19
+ This component works in phones with the operating system Android in the browser Chrome (minimum version 52) and in phones with the operating system iOS (minimum version 11) in the browser Safari
20
+
21
+ ## Installation
22
+
23
+ ```
24
+ $ npm install @idscan/onboarding
25
+ ```
26
+
27
+ This component contains JS, CSS files which require the mandatory import into your project.
28
+
29
+ 1. Before importing it is necessary to set the webpack-configuration.
30
+
31
+ *Note: The project must use the webpack 4 and later versions.*
32
+
33
+ 1.1. Add the following rules of loading to the field rules
34
+ ```javascript
35
+ {
36
+ test: /\.css$/,
37
+ use: ["style-loader", "css-loader"]
38
+ }
39
+ ```
40
+
41
+ 1.2. If you prefer to use neural networks from your domain, you should add the 'CopyWebpackPlugin' into the section 'plugins' which will copy the files, which are necessary for the work of the neural network, from the folder to another folder that should be selected by you.
42
+
43
+ *Note: The structure inside the folder of the component 'networks' must be saved on the server with due regard to the nesting.
44
+ There are binary files in the folder which do not have the extension. These files must be provided by the server with the header `Content-Type: application/octet-stream`.*
45
+ ```javascript
46
+ new CopyWebpackPlugin ([
47
+ {
48
+ from: 'node_modules/@idscan/onboarding/dist/networks/**/*',
49
+ to: 'networks/[folder]/[name].[ext]',
50
+ toType: 'template'
51
+ }
52
+ ])
53
+ ```
54
+
55
+ 1.3. Import the library and css to your project.
56
+
57
+ ```javascript
58
+ import DVSOIDVC from '@idscan/onboarding';
59
+ import '@idscan/onboarding/dist/css/onboarding.css';
60
+ ```
61
+ ## Initialization
62
+
63
+ Create an instance of the object 'DVS Online IDVC library wrapper'. The object takes one object of the component configuration as a parameter.
64
+
65
+ All configurations of @idscan/IDVC will be fetched from DVS Online by domainId.
66
+
67
+ Available fields:
68
+
69
+ **el** (string) - id of an element on the page where the component will be integrated. Required.
70
+
71
+ **applicantId** (string) - id of applicant. Required
72
+
73
+ **domainId** (string) - domain id where from will get configs and styles. Required
74
+
75
+ **publicKey** (string) - DVS Web API Public Key. Required
76
+
77
+ **chunkPublicPath** (string) - 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\'.
78
+
79
+ **callbacks** (object) - object with callback hooks. Available next hooks:
80
+
81
+ - **onChange** - callback-function which will be called after change one step. The returnable value is the object with the type and the image
82
+
83
+ - **onCameraError** - 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
84
+
85
+ - **onReset** - callback-function which will be called after reset all the steps. The returnable value is the object with the steps
86
+
87
+ - **onRetakeHook** - the function that will be called before reset the current step. The returnable value is the object with the current step
88
+
89
+ - **onValidate** - the function that will be called after validation response received. The returnable value is the object with validation information
90
+
91
+ - **onError** - the function that will be called on error. The response value is the object with the error code and the message
92
+
93
+ - **onMounted** - the function that will be called on the component mounted. This function doesn't return a value.
94
+
95
+ - **submit** - callback-function which will be called after completing all the steps. The returnable value is the object with the following content:
96
+ ```javascript
97
+ documentTypes: [
98
+ {
99
+ type: "ID",
100
+ steps:[
101
+ { type: 'front', name: 'Document Front', mode: { uploader: true, video: true } },
102
+ { type: 'pdf', name: 'Document PDF417 Barcode' , mode: { uploader: true, video: true } },
103
+ { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
104
+ ]},
105
+ {
106
+ type: "Passport",
107
+ steps:[
108
+ { type: 'mrz', name: 'Passport Front' , mode: { uploader: true, video: true } },
109
+ { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
110
+ ]},
111
+ ]
112
+ ```
113
+
114
+ steps – steps with the type and the image in the format 'base64'.
115
+
116
+ Also, if you use automatic capture, in the "back" step **trackstring** will be returned (raw PDF417 data from Barcode encoded in base64)
117
+
118
+
119
+ *Note: Request an license key for the library by emailing
120
+ [sales@idscan.net](mailto:sales@idscan.net) or [support@idscan.net](mailto:support@idscan.net)*
121
+
122
+ ## Methods
123
+
124
+ **setApplicant** (string) - the method that reinitialize wrapper for new applicant. Parameter is an applicant id of string type.
125
+ ```javascript
126
+ import DVSOIDVC from './Wrapper';
127
+
128
+ const lib = new DVSOIDVC({
129
+ applicantId: '...',
130
+ domainId: '...',
131
+ publicKey: '...',
132
+ chunkPublicPath: '/customPath/',
133
+ });
134
+
135
+ const btn = document.getElementById('btn');
136
+ btn.addEventListener('click', () => {
137
+ const applicantId = 'new applicant id';
138
+ lib.setApplicant(applicantId);
139
+ });
140
+ ```
141
+
142
+ **updateConfig** (string) - the method that reinitialize wrapper with new config. Parameter is an JSON encoded IDVC config. Works only in demo mode.
143
+
144
+ ## Version history
145
+ - **2.1.0**
146
+ - Added: new option in config "chunkPublicPath"
147
+
148
+ - **2.0.19**
149
+ - Updated IDVC component
150
+
151
+ - **2.0.18**
152
+ - Updated IDVC component
153
+
154
+ - **2.0.17**
155
+ - Some improvements
156
+
157
+ - **2.0.16**
158
+ - Some improvements
159
+
160
+ - **2.0.15**
161
+ - Some improvements
162
+
163
+ - **2.0.14**
164
+ - Some improvements
165
+
166
+ - **2.0.13**
167
+ - Updated IDVC component
168
+
169
+ - **2.0.12**
170
+ - Updated IDVC component
171
+
172
+ - **2.0.11**
173
+ - Updated IDVC component
174
+
175
+ - **2.0.10**
176
+ - Updated IDVC component
177
+
178
+ - **2.0.9**
179
+ - Updated IDVC component
180
+
181
+ - **2.0.8**
182
+ - Some improvements
183
+
184
+ - **2.0.7**
185
+ - Fixed background
186
+
187
+ - **2.0.6**
188
+ - Added version 1 config support
189
+
190
+ - **2.0.5**
191
+ - Updated IDVC component
192
+ - Fixed submit method
193
+
194
+ - **2.0.4**
195
+ - Updated IDVC component
196
+
197
+ - **2.0.3**
198
+ - Some improvements
199
+
200
+ - **2.0.2**
201
+ - Updated IDVC component
202
+
203
+ - **2.0.1**
204
+ - Added consent form
205
+
206
+ - **2.0.0**
207
+ - Migrate to the IDVC version 2
208
+
209
+ - **1.0.18**
210
+ - Fixed spinner
211
+
212
+ - **1.0.17**
213
+ - Fixed license key
214
+
215
+ - **1.0.16**
216
+ - Added sign for forced closing of the request
217
+
218
+ - **1.0.15**
219
+ - updated IDVC component
220
+
221
+ - **1.0.14**
222
+ - updated IDVC component
223
+
224
+ - **1.0.13**
225
+ - added ids for style tags
226
+
227
+ - **1.0.12**
228
+ - updated IDVC component
229
+
230
+ - **1.0.11**
231
+ - updated using DVS Online API
232
+
233
+ - **1.0.10**
234
+ - added: onMounted callback
235
+
236
+ - **1.0.9**
237
+ - @idscan/idvc dependency updated
238
+
239
+ - **1.0.8**
240
+ - added: reload component with new configs in demo mode
241
+
242
+ - **1.0.7**
243
+ - updated using DVS Online API
244
+
245
+ - **1.0.6**
246
+ - updated using DVS Online API
247
+
248
+ - **1.0.5**
249
+ - updated IDVC component
250
+ - updated using DVS Online API
251
+
252
+ - **1.0.4**
253
+ - use CDN
254
+
255
+ - **1.0.3**
256
+ - Changed readme
257
+
258
+ - **1.0.2**
259
+ - Some improvements
260
+
261
+ - **1.0.1**
262
+ - Changed readme
263
+
264
+ - **1.0.0**