@idscan/onboarding 2.0.20 → 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 DELETED
@@ -1,255 +0,0 @@
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
- **callbacks** (object) - object with callback hooks. Available next hooks:
78
-
79
- - **onChange** - callback-function which will be called after change one step. The returnable value is the object with the type and the image
80
-
81
- - **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
82
-
83
- - **onReset** - callback-function which will be called after reset all the steps. The returnable value is the object with the steps
84
-
85
- - **onRetakeHook** - the function that will be called before reset the current step. The returnable value is the object with the current step
86
-
87
- - **onValidate** - the function that will be called after validation response received. The returnable value is the object with validation information
88
-
89
- - **onError** - the function that will be called on error. The response value is the object with the error code and the message
90
-
91
- - **onMounted** - the function that will be called on the component mounted. This function doesn't return a value.
92
-
93
- - **submit** - callback-function which will be called after completing all the steps. The returnable value is the object with the following content:
94
- ```javascript
95
- documentTypes: [
96
- {
97
- type: "ID",
98
- steps:[
99
- { type: 'front', name: 'Document Front', mode: { uploader: true, video: true } },
100
- { type: 'pdf', name: 'Document PDF417 Barcode' , mode: { uploader: true, video: true } },
101
- { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
102
- ]},
103
- {
104
- type: "Passport",
105
- steps:[
106
- { type: 'mrz', name: 'Passport Front' , mode: { uploader: true, video: true } },
107
- { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
108
- ]},
109
- ]
110
- ```
111
-
112
- steps – steps with the type and the image in the format 'base64'.
113
-
114
- Also, if you use automatic capture, in the "back" step **trackstring** will be returned (raw PDF417 data from Barcode encoded in base64)
115
-
116
-
117
- *Note: Request an license key for the library by emailing
118
- [sales@idscan.net](mailto:sales@idscan.net) or [support@idscan.net](mailto:support@idscan.net)*
119
-
120
- ## Methods
121
-
122
- **setApplicant** (string) - the method that reinitialize wrapper for new applicant. Parameter is an applicant id of string type.
123
- ```javascript
124
- import DVSOIDVC from './Wrapper';
125
-
126
- const lib = new DVSOIDVC({
127
- applicantId: '...',
128
- domainId: '...',
129
- publicKey: '...',
130
- });
131
-
132
- const btn = document.getElementById('btn');
133
- btn.addEventListener('click', () => {
134
- const applicantId = 'new applicant id';
135
- lib.setApplicant(applicantId);
136
- });
137
- ```
138
-
139
- **updateConfig** (string) - the method that reinitialize wrapper with new config. Parameter is an JSON encoded IDVC config. Works only in demo mode.
140
-
141
- ## Version history
142
- - **2.0.18**
143
- - Updated IDVC component
144
-
145
- - **2.0.17**
146
- - Some improvements
147
-
148
- - **2.0.16**
149
- - Some improvements
150
-
151
- - **2.0.15**
152
- - Some improvements
153
-
154
- - **2.0.14**
155
- - Some improvements
156
-
157
- - **2.0.13**
158
- - Updated IDVC component
159
-
160
- - **2.0.12**
161
- - Updated IDVC component
162
-
163
- - **2.0.11**
164
- - Updated IDVC component
165
-
166
- - **2.0.10**
167
- - Updated IDVC component
168
-
169
- - **2.0.9**
170
- - Updated IDVC component
171
-
172
- - **2.0.8**
173
- - Some improvements
174
-
175
- - **2.0.7**
176
- - Fixed background
177
-
178
- - **2.0.6**
179
- - Added version 1 config support
180
-
181
- - **2.0.5**
182
- - Updated IDVC component
183
- - Fixed submit method
184
-
185
- - **2.0.4**
186
- - Updated IDVC component
187
-
188
- - **2.0.3**
189
- - Some improvements
190
-
191
- - **2.0.2**
192
- - Updated IDVC component
193
-
194
- - **2.0.1**
195
- - Added consent form
196
-
197
- - **2.0.0**
198
- - Migrate to the IDVC version 2
199
-
200
- - **1.0.18**
201
- - Fixed spinner
202
-
203
- - **1.0.17**
204
- - Fixed license key
205
-
206
- - **1.0.16**
207
- - Added sign for forced closing of the request
208
-
209
- - **1.0.15**
210
- - updated IDVC component
211
-
212
- - **1.0.14**
213
- - updated IDVC component
214
-
215
- - **1.0.13**
216
- - added ids for style tags
217
-
218
- - **1.0.12**
219
- - updated IDVC component
220
-
221
- - **1.0.11**
222
- - updated using DVS Online API
223
-
224
- - **1.0.10**
225
- - added: onMounted callback
226
-
227
- - **1.0.9**
228
- - @idscan/idvc dependency updated
229
-
230
- - **1.0.8**
231
- - added: reload component with new configs in demo mode
232
-
233
- - **1.0.7**
234
- - updated using DVS Online API
235
-
236
- - **1.0.6**
237
- - updated using DVS Online API
238
-
239
- - **1.0.5**
240
- - updated IDVC component
241
- - updated using DVS Online API
242
-
243
- - **1.0.4**
244
- - use CDN
245
-
246
- - **1.0.3**
247
- - Changed readme
248
-
249
- - **1.0.2**
250
- - Some improvements
251
-
252
- - **1.0.1**
253
- - Changed readme
254
-
255
- - **1.0.0**