@idscan/onboarding 2.0.13 → 2.0.17
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/LICENSE.txt +202 -202
- package/dist/css/onboarding.css +1 -1
- package/dist/js/wrapper.js +1 -1
- package/package.json +61 -61
- package/readme.md +0 -240
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@idscan/onboarding",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Wrapper of the IDVC library for DVS Online.",
|
|
5
|
-
"main": "dist/js/wrapper.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"start": "webpack serve --mode development",
|
|
11
|
-
"build": "webpack build --mode development --progress --stats-children",
|
|
12
|
-
"prod": "webpack build --mode production --progress --stats-children",
|
|
13
|
-
"pack": "npm pack",
|
|
14
|
-
"patch": "npm version patch"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@idscan/idvc2": "2.2.2",
|
|
18
|
-
"core-js": "^3.19.1",
|
|
19
|
-
"regenerator-runtime": "^0.13.9"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@babel/core": "^7.16.0",
|
|
23
|
-
"@babel/eslint-parser": "^7.16.3",
|
|
24
|
-
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
25
|
-
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
26
|
-
"@babel/plugin-proposal-private-methods": "^7.16.0",
|
|
27
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
28
|
-
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
|
|
29
|
-
"@babel/plugin-transform-runtime": "^7.16.4",
|
|
30
|
-
"@babel/preset-env": "^7.16.4",
|
|
31
|
-
"babel-loader": "^8.2.3",
|
|
32
|
-
"babel-plugin-transform-runtime": "^6.23.0",
|
|
33
|
-
"copy-webpack-plugin": "^9.1.0",
|
|
34
|
-
"css-loader": "^6.5.1",
|
|
35
|
-
"eslint": "^7.25.0",
|
|
36
|
-
"eslint-config-airbnb": "^18.2.1",
|
|
37
|
-
"eslint-config-airbnb-base": "^14.2.1",
|
|
38
|
-
"eslint-plugin-import": "^2.22.1",
|
|
39
|
-
"eslint-plugin-jest": "^24.3.6",
|
|
40
|
-
"eslint-webpack-plugin": "^3.1.1",
|
|
41
|
-
"html-loader": "^3.0.1",
|
|
42
|
-
"html-webpack-plugin": "^5.5.0",
|
|
43
|
-
"mini-css-extract-plugin": "^2.4.5",
|
|
44
|
-
"sass": "^1.43.5",
|
|
45
|
-
"sass-loader": "^12.3.0",
|
|
46
|
-
"style-loader": "^3.3.1",
|
|
47
|
-
"terser-webpack-plugin": "^5.1.4",
|
|
48
|
-
"webpack": "^5.64.3",
|
|
49
|
-
"webpack-cli": "^4.9.1",
|
|
50
|
-
"webpack-dev-server": "^3.11.3"
|
|
51
|
-
},
|
|
52
|
-
"author": "IDScan.net",
|
|
53
|
-
"license": "Apache-2.0",
|
|
54
|
-
"keywords": [
|
|
55
|
-
"idscan",
|
|
56
|
-
"idvc",
|
|
57
|
-
"onboarding",
|
|
58
|
-
"dvs",
|
|
59
|
-
"online"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@idscan/onboarding",
|
|
3
|
+
"version": "2.0.17",
|
|
4
|
+
"description": "Wrapper of the IDVC library for DVS Online.",
|
|
5
|
+
"main": "dist/js/wrapper.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "webpack serve --mode development",
|
|
11
|
+
"build": "webpack build --mode development --progress --stats-children",
|
|
12
|
+
"prod": "webpack build --mode production --progress --stats-children",
|
|
13
|
+
"pack": "npm pack",
|
|
14
|
+
"patch": "npm version patch"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@idscan/idvc2": "2.2.2",
|
|
18
|
+
"core-js": "^3.19.1",
|
|
19
|
+
"regenerator-runtime": "^0.13.9"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@babel/core": "^7.16.0",
|
|
23
|
+
"@babel/eslint-parser": "^7.16.3",
|
|
24
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
25
|
+
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
26
|
+
"@babel/plugin-proposal-private-methods": "^7.16.0",
|
|
27
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
28
|
+
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
|
|
29
|
+
"@babel/plugin-transform-runtime": "^7.16.4",
|
|
30
|
+
"@babel/preset-env": "^7.16.4",
|
|
31
|
+
"babel-loader": "^8.2.3",
|
|
32
|
+
"babel-plugin-transform-runtime": "^6.23.0",
|
|
33
|
+
"copy-webpack-plugin": "^9.1.0",
|
|
34
|
+
"css-loader": "^6.5.1",
|
|
35
|
+
"eslint": "^7.25.0",
|
|
36
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
37
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
38
|
+
"eslint-plugin-import": "^2.22.1",
|
|
39
|
+
"eslint-plugin-jest": "^24.3.6",
|
|
40
|
+
"eslint-webpack-plugin": "^3.1.1",
|
|
41
|
+
"html-loader": "^3.0.1",
|
|
42
|
+
"html-webpack-plugin": "^5.5.0",
|
|
43
|
+
"mini-css-extract-plugin": "^2.4.5",
|
|
44
|
+
"sass": "^1.43.5",
|
|
45
|
+
"sass-loader": "^12.3.0",
|
|
46
|
+
"style-loader": "^3.3.1",
|
|
47
|
+
"terser-webpack-plugin": "^5.1.4",
|
|
48
|
+
"webpack": "^5.64.3",
|
|
49
|
+
"webpack-cli": "^4.9.1",
|
|
50
|
+
"webpack-dev-server": "^3.11.3"
|
|
51
|
+
},
|
|
52
|
+
"author": "IDScan.net",
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"keywords": [
|
|
55
|
+
"idscan",
|
|
56
|
+
"idvc",
|
|
57
|
+
"onboarding",
|
|
58
|
+
"dvs",
|
|
59
|
+
"online"
|
|
60
|
+
]
|
|
61
|
+
}
|
package/readme.md
DELETED
|
@@ -1,240 +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/dvsonline-idvc.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.13**
|
|
143
|
-
- Updated IDVC component
|
|
144
|
-
|
|
145
|
-
- **2.0.12**
|
|
146
|
-
- Updated IDVC component
|
|
147
|
-
|
|
148
|
-
- **2.0.11**
|
|
149
|
-
- Updated IDVC component
|
|
150
|
-
|
|
151
|
-
- **2.0.10**
|
|
152
|
-
- Updated IDVC component
|
|
153
|
-
|
|
154
|
-
- **2.0.9**
|
|
155
|
-
- Updated IDVC component
|
|
156
|
-
|
|
157
|
-
- **2.0.8**
|
|
158
|
-
- Some improvements
|
|
159
|
-
|
|
160
|
-
- **2.0.7**
|
|
161
|
-
- Fixed background
|
|
162
|
-
|
|
163
|
-
- **2.0.6**
|
|
164
|
-
- Added version 1 config support
|
|
165
|
-
|
|
166
|
-
- **2.0.5**
|
|
167
|
-
- Updated IDVC component
|
|
168
|
-
- Fixed submit method
|
|
169
|
-
|
|
170
|
-
- **2.0.4**
|
|
171
|
-
- Updated IDVC component
|
|
172
|
-
|
|
173
|
-
- **2.0.3**
|
|
174
|
-
- Some improvements
|
|
175
|
-
|
|
176
|
-
- **2.0.2**
|
|
177
|
-
- Updated IDVC component
|
|
178
|
-
|
|
179
|
-
- **2.0.1**
|
|
180
|
-
- Added consent form
|
|
181
|
-
|
|
182
|
-
- **2.0.0**
|
|
183
|
-
- Migrate to the IDVC version 2
|
|
184
|
-
|
|
185
|
-
- **1.0.18**
|
|
186
|
-
- Fixed spinner
|
|
187
|
-
|
|
188
|
-
- **1.0.17**
|
|
189
|
-
- Fixed license key
|
|
190
|
-
|
|
191
|
-
- **1.0.16**
|
|
192
|
-
- Added sign for forced closing of the request
|
|
193
|
-
|
|
194
|
-
- **1.0.15**
|
|
195
|
-
- updated IDVC component
|
|
196
|
-
|
|
197
|
-
- **1.0.14**
|
|
198
|
-
- updated IDVC component
|
|
199
|
-
|
|
200
|
-
- **1.0.13**
|
|
201
|
-
- added ids for style tags
|
|
202
|
-
|
|
203
|
-
- **1.0.12**
|
|
204
|
-
- updated IDVC component
|
|
205
|
-
|
|
206
|
-
- **1.0.11**
|
|
207
|
-
- updated using DVS Online API
|
|
208
|
-
|
|
209
|
-
- **1.0.10**
|
|
210
|
-
- added: onMounted callback
|
|
211
|
-
|
|
212
|
-
- **1.0.9**
|
|
213
|
-
- @idscan/idvc dependency updated
|
|
214
|
-
|
|
215
|
-
- **1.0.8**
|
|
216
|
-
- added: reload component with new configs in demo mode
|
|
217
|
-
|
|
218
|
-
- **1.0.7**
|
|
219
|
-
- updated using DVS Online API
|
|
220
|
-
|
|
221
|
-
- **1.0.6**
|
|
222
|
-
- updated using DVS Online API
|
|
223
|
-
|
|
224
|
-
- **1.0.5**
|
|
225
|
-
- updated IDVC component
|
|
226
|
-
- updated using DVS Online API
|
|
227
|
-
|
|
228
|
-
- **1.0.4**
|
|
229
|
-
- use CDN
|
|
230
|
-
|
|
231
|
-
- **1.0.3**
|
|
232
|
-
- Changed readme
|
|
233
|
-
|
|
234
|
-
- **1.0.2**
|
|
235
|
-
- Some improvements
|
|
236
|
-
|
|
237
|
-
- **1.0.1**
|
|
238
|
-
- Changed readme
|
|
239
|
-
|
|
240
|
-
- **1.0.0**
|