@idscan/idvc2 2.0.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/LICENSE.txt +202 -0
- package/README.md +727 -0
- package/dist/LICENSE.txt +202 -0
- package/dist/README.md +727 -0
- package/dist/css/idvc.css +1 -0
- package/dist/index.html +96 -0
- package/dist/js/defaultConfig.ts +246 -0
- package/dist/js/environment/capturingModes.json +4 -0
- package/dist/js/environment/cssVariables.json +184 -0
- package/dist/js/environment/designations.ts +19 -0
- package/dist/js/environment/documentTypes.ts +145 -0
- package/dist/js/environment/langs.ts +270 -0
- package/dist/js/environment/loadModes.json +11 -0
- package/dist/js/environment/loopResult.ts +14 -0
- package/dist/js/environment/networkNames.json +27 -0
- package/dist/js/environment/realFaceModes.ts +15 -0
- package/dist/js/environment/stepsDescription.ts +85 -0
- package/dist/js/environment/triangulation.ts +188 -0
- package/dist/js/idvc.d.ts +2 -0
- package/dist/js/idvc.js +2 -0
- package/dist/js/idvc.js.LICENSE.txt +266 -0
- package/dist/js/mrz.d.ts +105 -0
- package/dist/networks/angles20210831.bin +0 -0
- package/dist/networks/angles20210831.json +1 -0
- package/dist/networks/blazeface20210831.bin +0 -0
- package/dist/networks/blazeface20210831.json +1 -0
- package/dist/networks/facemesh20210831.bin +0 -0
- package/dist/networks/facemesh20210831.json +1 -0
- package/dist/networks/mrz20210831.bin +0 -0
- package/dist/networks/mrz20210831.json +1 -0
- package/dist/networks/types20220505.bin +0 -0
- package/dist/networks/types20220505.json +1 -0
- package/dist/notes.txt +23 -0
- package/package.json +101 -0
package/dist/index.html
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if lt IE 7 ]> <html lang="en" class="ie6" > <![endif]--><!--[if IE 7 ]> <html lang="en" class="ie7" > <![endif]--><!--[if IE 8 ]> <html lang="en" class="ie8" > <![endif]--><!--[if IE 9 ]> <html lang="en" class="ie9" > <![endif]--><!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class=""><!--<![endif]--><head><meta charset="utf-8"><title>Demo Pages</title><link href="css/idvc.css" rel="stylesheet"></head><body><style>body {
|
|
2
|
+
background: #eff3fc;
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
.container {
|
|
6
|
+
max-width: 480px;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
}</style><div class="container"><div id="videoCapturingEl"></div></div><button id="btn">Show Spinner</button> <button id="btn-reload">Reload component</button> <button id="btn-change-en">En</button> <button id="btn-change-es">Es</button><script src="js/idvc.js"></script><script type="module">// 142 eyJwZGY0MTdrZXkiOiIyRXVvNmJ1ZGVYRTlaeDg5QUtKVXdTdVVwK2NNSlVNM1VDV3BNR0tQK0hNQnBKbFN6aU52cG9IUTNSQm1FejZhclNsQWhiQ25OaVFpcXdHVHFRVEVDcnBNS1duTGZpUlVqdTAvVlVXZ21VM2Z0RVhDWjNyTXgwUis5aXBJYXhqOHdQeWJUY05pWjdoUTMxaHZCa1VxaXplK1U1cWJXeXJIL2VJMVhHdGthSGc9IiwiaW1hZ2VQcm9jZXNzaW5nS2V5IjoiaWM1bUFMK2NOL3ZXaXQ4N295ZGdOVGN3NGtZTjJ3OHU3T3U4dzdaSjRFc2JYNUl6RGdRSXVmYkIzN1dqL0xVaFJoUjgvV3pnUHVRY3FQK2ZHR3crWmlzcUlIKzJJYlBBL2RhMjVVVm16WlhmRGVCN3lBUXBxOHRMb0JFNzdlSi94akZ1emsxRlNoWnhZTnNIa1ZsWXRNOTRyYXdJeUluVm1UYWNFMkxCcUxnPSIsInRyYWNrU3RyaW5nUGFyc2VyS2V5IjoiSmxtVFR0VjJxMEx0aE1aOWYvM1gwRGVvSHo4bnFIRkttYmdjN2EwcFo1Tlo3bE9Zc0VsbWlNMGppY3NOQWs3NDlWMU8wTVN3R0U0SEtOM2pkanpBYTBDQ0prZlQ2aXpMb1lvcnd5cmd0Y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tOM2pkanpBYTBDQ0prZlQ2aXpMb1lvcnd5cmd0Y241d2FrdkM4SkdVd0dDdE1tb3cyc25VTHNpY1ZWYWVVS0JwWHdiZnlLM295R3ZBajBXNjVvTU5xK0V1bkxXNmQwPSIsImNvbW1vbkxpY2Vuc2VLZXkiOiIwNDhMUFA5L3NqeWNicFFIZnlNQ1dPQnNQMHVvWUoxblJJQmlNbDh2NFpwV0hIdE5OZVVuMVlJZ0dWdHRZNnk0M21yYXBLQzJjMWZYRG54UndLRi9UaEZ0Vi84aGFyMTZxOWEzbjE4WDlhdytyWGdiNno1Q3YzbUpnVkVvNmNEVWRveFRYTWhteS84WW1VVEFQUE91Rk5xbHZEcWFDeTRMS05XL1ZzNERhbTA9In0=',
|
|
14
|
+
autoContinue: false,
|
|
15
|
+
fixFrontOrientAfterUpload: false,
|
|
16
|
+
parsePDF: true,
|
|
17
|
+
realFaceMode: 'auto', // none, auto, all
|
|
18
|
+
useCDN: true,
|
|
19
|
+
isSubmitMetaData: true,
|
|
20
|
+
resizeUploadedImage: 2000,
|
|
21
|
+
isShowDocumentTypeSelect: true,
|
|
22
|
+
language: 'en',
|
|
23
|
+
documentTypes: [
|
|
24
|
+
{
|
|
25
|
+
type: 'ID',
|
|
26
|
+
steps:[
|
|
27
|
+
// { type: 'face', name: 'Face', mode: { uploader: true, video: true } },
|
|
28
|
+
// { type: 'pdf', name: 'Document PDF417 Barcode', mode: { uploader: true, video: true } },
|
|
29
|
+
// { type: 'mrz', name: 'Document MRZ', mode: { uploader: true, video: true } },
|
|
30
|
+
{ type: 'front', name: 'Document Front', mode: { uploader: true, video: true } },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
// {
|
|
34
|
+
// type: 'VIN',
|
|
35
|
+
// steps:[
|
|
36
|
+
// { type: 'photo', name: 'VIN' },
|
|
37
|
+
// ],
|
|
38
|
+
// },
|
|
39
|
+
// {
|
|
40
|
+
// type: 'Barcode',
|
|
41
|
+
// steps:[
|
|
42
|
+
// { type: 'barcode', name: 'barcode detection' },
|
|
43
|
+
// ],
|
|
44
|
+
// },
|
|
45
|
+
{
|
|
46
|
+
type: 'Passport',
|
|
47
|
+
steps:[
|
|
48
|
+
// { type: 'front', name: 'Document Front' },
|
|
49
|
+
{ type: 'mrz', name: 'Passport Front', mode: { uploader: false, video: true } },
|
|
50
|
+
// { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
clickGuidlines () {
|
|
55
|
+
console.log('clickGuidlines')
|
|
56
|
+
},
|
|
57
|
+
onChange (data) {
|
|
58
|
+
console.log('change')
|
|
59
|
+
console.log(data)
|
|
60
|
+
},
|
|
61
|
+
onReset (data) {
|
|
62
|
+
console.log('reset')
|
|
63
|
+
// console.log(data)
|
|
64
|
+
},
|
|
65
|
+
onCameraError (data) {
|
|
66
|
+
console.log('CAMERA_ERR', JSON.stringify(data))
|
|
67
|
+
},
|
|
68
|
+
submit (data) {
|
|
69
|
+
console.log(data)
|
|
70
|
+
},
|
|
71
|
+
onRetakeHook(data) {
|
|
72
|
+
console.log('retake');
|
|
73
|
+
// console.log(data);
|
|
74
|
+
},
|
|
75
|
+
onMounted() {
|
|
76
|
+
console.log('onMounted');
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
const videoCapturingComponent = new IDVC.default(config);
|
|
80
|
+
let k = false
|
|
81
|
+
document.getElementById('btn').addEventListener('click', () => {
|
|
82
|
+
k = !k
|
|
83
|
+
videoCapturingComponent.showSpinner(k)
|
|
84
|
+
})
|
|
85
|
+
document.getElementById('btn-reload').addEventListener('click', () => {
|
|
86
|
+
// config.enableLimitation = !config.enableLimitation;
|
|
87
|
+
videoCapturingComponent.reloadComponent(config);
|
|
88
|
+
})
|
|
89
|
+
document.getElementById('btn-change-en').addEventListener('click', () => {
|
|
90
|
+
|
|
91
|
+
videoCapturingComponent.changeLanguage('en');
|
|
92
|
+
})
|
|
93
|
+
document.getElementById('btn-change-es').addEventListener('click', () => {
|
|
94
|
+
|
|
95
|
+
videoCapturingComponent.changeLanguage('es');
|
|
96
|
+
})</script></body></head></html>
|
|
@@ -0,0 +1,246 @@
|
|
|
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: 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: 'isShowDocumentTypeSelect',
|
|
134
|
+
type: 'Boolean',
|
|
135
|
+
description: 'If only one document type is in the config and this option is disabled, the library starts immediately.',
|
|
136
|
+
defaultValue: true,
|
|
137
|
+
validationFn: 'validateBool',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'useCDN',
|
|
141
|
+
type: 'Boolean',
|
|
142
|
+
description: 'Set to true if you prefer to load neural networks from cdn instead of your domain.',
|
|
143
|
+
defaultValue: false,
|
|
144
|
+
validationFn: 'validateBool',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'autoContinue',
|
|
148
|
+
type: 'Boolean',
|
|
149
|
+
description: 'This option switches on/off the automatic transition to the next step.',
|
|
150
|
+
defaultValue: true,
|
|
151
|
+
validationFn: 'validateBool',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'isShowGuidelinesButton',
|
|
155
|
+
type: 'Boolean',
|
|
156
|
+
description: 'Switches on the button show guidLines',
|
|
157
|
+
defaultValue: false,
|
|
158
|
+
validationFn: 'validateBool',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'parsePDF',
|
|
162
|
+
type: 'Boolean',
|
|
163
|
+
description: 'If it is enabled, the received trackstring is converted into the parsed document fields. Thus on-server parsing won’t be necessary. At the PDF step, the parsedData object would be available.',
|
|
164
|
+
defaultValue: false,
|
|
165
|
+
validationFn: 'validateBool',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'fixFrontOrientAfterUpload',
|
|
169
|
+
type: 'Boolean',
|
|
170
|
+
description: 'This option provides the possibility to adjust the correct position of the document in case of manual uploading.',
|
|
171
|
+
defaultValue: false,
|
|
172
|
+
validationFn: 'validateBool',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'isSubmitMetaData',
|
|
176
|
+
type: 'Boolean',
|
|
177
|
+
description: '',
|
|
178
|
+
defaultValue: true,
|
|
179
|
+
validationFn: 'validateBool',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'onChange',
|
|
183
|
+
type: 'Function',
|
|
184
|
+
description: 'Callback-function which will be called after change one step. The returnable value is the object with the type and the image',
|
|
185
|
+
defaultValue() {
|
|
186
|
+
return true;
|
|
187
|
+
},
|
|
188
|
+
validationFn: 'validateFunction',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'clickGuidlines',
|
|
192
|
+
type: 'Function',
|
|
193
|
+
description: 'Callback-function which will be called after guidLines button.',
|
|
194
|
+
defaultValue() {
|
|
195
|
+
return true;
|
|
196
|
+
},
|
|
197
|
+
validationFn: 'validateFunction',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'onReset',
|
|
201
|
+
type: 'Function',
|
|
202
|
+
description: 'Callback-function which will be called after reset all the steps. The returnable value is the object with the steps',
|
|
203
|
+
defaultValue() {
|
|
204
|
+
return true;
|
|
205
|
+
},
|
|
206
|
+
validationFn: 'validateFunction',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: 'submit',
|
|
210
|
+
type: 'Function',
|
|
211
|
+
description: 'Callback-function which will be called after completing all the steps.',
|
|
212
|
+
defaultValue() {
|
|
213
|
+
return true;
|
|
214
|
+
},
|
|
215
|
+
validationFn: 'validateFunction',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'onRetakeHook',
|
|
219
|
+
type: 'Function',
|
|
220
|
+
description: 'The function that will be called before reset the current step. The returnable value is the object with the current step',
|
|
221
|
+
defaultValue() {
|
|
222
|
+
return true;
|
|
223
|
+
},
|
|
224
|
+
validationFn: 'validateFunction',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'onCameraError',
|
|
228
|
+
type: 'Function',
|
|
229
|
+
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',
|
|
230
|
+
defaultValue() {
|
|
231
|
+
return true;
|
|
232
|
+
},
|
|
233
|
+
validationFn: 'validateFunction',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'onMounted',
|
|
237
|
+
type: 'Function',
|
|
238
|
+
description: 'the function that will be called on the component mounted. This function doesn\'t return a value.',
|
|
239
|
+
defaultValue() {
|
|
240
|
+
return true;
|
|
241
|
+
},
|
|
242
|
+
validationFn: 'validateFunction',
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
|
|
246
|
+
export default defaultConfig;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"--btn-border-radius-big": {
|
|
3
|
+
"default": 4,
|
|
4
|
+
"type": "Number",
|
|
5
|
+
"description": [
|
|
6
|
+
"radius of retake, continue, submit buttons"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"--btn-border-radius-small": {
|
|
10
|
+
"default": 4,
|
|
11
|
+
"type": "Number",
|
|
12
|
+
"description": [
|
|
13
|
+
"radius of the manual switch button",
|
|
14
|
+
"radius of the messagebox"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"--color-text-secondary-light": {
|
|
18
|
+
"default": "#C4C4C4",
|
|
19
|
+
"type": "Color",
|
|
20
|
+
"description": [
|
|
21
|
+
"'select document type' menus's checkmark"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"--color-positive-light": {
|
|
25
|
+
"default": "#17EA4C",
|
|
26
|
+
"type": "Color",
|
|
27
|
+
"description": [
|
|
28
|
+
"success frame on capturing"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"--border-color-divider": {
|
|
32
|
+
"default": "#C0C0C0",
|
|
33
|
+
"type": "Color",
|
|
34
|
+
"description": [
|
|
35
|
+
"message box's default border color",
|
|
36
|
+
"'select document type' menus's devider"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"--color-primary-light-2": {
|
|
40
|
+
"default": "#DCE7FD",
|
|
41
|
+
"type": "Color",
|
|
42
|
+
"description": [
|
|
43
|
+
"primary button hover, focus colors"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"--color-primary-light-7": {
|
|
47
|
+
"default": "#85AAF7",
|
|
48
|
+
"type": "Color",
|
|
49
|
+
"description": [
|
|
50
|
+
"transparent button hover and focus background color"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"--color-primary-light-9": {
|
|
54
|
+
"default": "#6291F4",
|
|
55
|
+
"type": "Color",
|
|
56
|
+
"description": [
|
|
57
|
+
"transparent button border hover, focus colors",
|
|
58
|
+
"'select document type' menus's selected item background"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"--color-primary-dark-2": {
|
|
62
|
+
"default": "#080D18",
|
|
63
|
+
"type": "Color",
|
|
64
|
+
"description": [
|
|
65
|
+
"primary button active colors",
|
|
66
|
+
"transparent button active font color and border color"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"--color-background-subheader": {
|
|
70
|
+
"default": "#F5F6F9",
|
|
71
|
+
"type": "Color",
|
|
72
|
+
"description": [
|
|
73
|
+
"background of the bottom part of the active step in 'steps' section",
|
|
74
|
+
"'type not defined' select background of the modal window",
|
|
75
|
+
"scrollbar of 'result' modal window"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"--color-background-white": {
|
|
79
|
+
"default": "#FFF",
|
|
80
|
+
"type": "Color",
|
|
81
|
+
"description": [
|
|
82
|
+
"uploader's background",
|
|
83
|
+
"background of 'result' modal window container",
|
|
84
|
+
"background of 'type not defined' modal window",
|
|
85
|
+
"background of 'document type-hint’ section"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"--border-color-base": {
|
|
89
|
+
"default": "#DCDFE6",
|
|
90
|
+
"type": "Color",
|
|
91
|
+
"description": [
|
|
92
|
+
"border of 'type not defined' modal window select",
|
|
93
|
+
"border of 'document type-hint' section",
|
|
94
|
+
"borders of top part in 'steps' section",
|
|
95
|
+
"bottom icons of inactive step in 'steps' section",
|
|
96
|
+
"image background in 'steps' section"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"--color-primary": {
|
|
100
|
+
"default": "#5185F3",
|
|
101
|
+
"type": "Color",
|
|
102
|
+
"description": [
|
|
103
|
+
"background of primary buttons",
|
|
104
|
+
"active step name, icon, and bottom line of the active step in 'steps' section",
|
|
105
|
+
"uploader labels, border",
|
|
106
|
+
"manual take picture button in video capturing",
|
|
107
|
+
"change the document type in 'document type-hint' section",
|
|
108
|
+
"step name on hover in 'steps' section",
|
|
109
|
+
"guideline inscription",
|
|
110
|
+
"background of the upload icon in the uploader",
|
|
111
|
+
"uploader's emphasized descriptions",
|
|
112
|
+
"disabled primary buttons",
|
|
113
|
+
"disabled button border",
|
|
114
|
+
"spinner's color"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"--color-success": {
|
|
118
|
+
"default": "#13CE66",
|
|
119
|
+
"type": "Color",
|
|
120
|
+
"description": [
|
|
121
|
+
"succeeded steps in 'steps' section",
|
|
122
|
+
"face shape when capturing the video in face step",
|
|
123
|
+
"capture progress",
|
|
124
|
+
"valid sign of 'result' modal window container",
|
|
125
|
+
"hints on video capture",
|
|
126
|
+
"background of uploader's success sign"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"--color-danger": {
|
|
130
|
+
"default": "#FF4949",
|
|
131
|
+
"type": "Color",
|
|
132
|
+
"description": [
|
|
133
|
+
"background and bottom border of the step error in 'steps' section",
|
|
134
|
+
"header of 'type not defined' modal window",
|
|
135
|
+
"invalid sign of 'result' modal window container",
|
|
136
|
+
"license error text"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"--color-warning": {
|
|
140
|
+
"default": "#FFC632",
|
|
141
|
+
"type": "Color",
|
|
142
|
+
"description": [
|
|
143
|
+
"warning sign of uploader"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"--color-text-secondary": {
|
|
147
|
+
"default": "#909399",
|
|
148
|
+
"type": "Color",
|
|
149
|
+
"description": [
|
|
150
|
+
"scrollbar of 'result' modal window",
|
|
151
|
+
"library version",
|
|
152
|
+
"descriptions of the uploader",
|
|
153
|
+
"close sign of 'result' modal window",
|
|
154
|
+
"name of the inactive step in 'steps' section"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"--color-black": {
|
|
158
|
+
"default": "#000",
|
|
159
|
+
"type": "Color",
|
|
160
|
+
"description": [
|
|
161
|
+
"face shape icon in video capturing when the face is not detected at the face step",
|
|
162
|
+
"shadow of 'type not defined' modal window",
|
|
163
|
+
"caption of 'type not defined' modal window select",
|
|
164
|
+
"uploader's bold descriptions",
|
|
165
|
+
"shadow of 'result' modal window",
|
|
166
|
+
"bottom border of 'result' modal window row",
|
|
167
|
+
"options of change the document type in 'document type-hint' section",
|
|
168
|
+
"uploader's error sign stroke",
|
|
169
|
+
"uploader's error description"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"--color-white": {
|
|
173
|
+
"default": "#FFF",
|
|
174
|
+
"type": "Color",
|
|
175
|
+
"description": [
|
|
176
|
+
"caption of buttons",
|
|
177
|
+
"border and caption of manual take picture button",
|
|
178
|
+
"upload icon",
|
|
179
|
+
"header description of 'type not defined' modal window",
|
|
180
|
+
"uploader success sign's checkmark",
|
|
181
|
+
"description of capture progress"
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// stores the decryption of the field designations in the transmitted metaData
|
|
2
|
+
export default [
|
|
3
|
+
{
|
|
4
|
+
oneLetterKey: 'a',
|
|
5
|
+
fullNameKey: 'userAgent',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
oneLetterKey: 'c',
|
|
9
|
+
fullNameKey: 'capturedMethod',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
oneLetterKey: 'l',
|
|
13
|
+
fullNameKey: 'logs',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
oneLetterKey: 's',
|
|
17
|
+
fullNameKey: 'steps',
|
|
18
|
+
},
|
|
19
|
+
];
|