@idscan/onboarding 2.10.3 → 2.11.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/package.json CHANGED
@@ -1,70 +1,79 @@
1
- {
2
- "name": "@idscan/onboarding",
3
- "version": "2.10.3",
4
- "description": "Wrapper of the IDVC library for DIVE Online.",
5
- "main": "dist/wrapper.umd.js",
6
- "module": "dist/wrapper.es.js",
7
- "type": "module",
8
- "types": "dist/src/Wrapper.d.ts",
9
- "files": [
10
- "dist/**",
11
- ".npmignore",
12
- "notes.txt",
13
- "LICENSE.txt",
14
- "README.md"
15
- ],
16
- "scripts": {
17
- "start": "vite --host",
18
- "build": "vite build",
19
- "prod": "vite build --mode production",
20
- "pack": "npm pack",
21
- "patch": "npm version patch",
22
- "lint": "eslint \"src/**/*.{js,ts}\" --ignore-pattern \"src/UI/**\"",
23
- "lint:fix": "eslint \"src/**/*.{js,ts}\" --ignore-pattern \"src/UI/**\" --fix",
24
- "minor": "npm version minor",
25
- "storybook": "storybook dev -p 6006",
26
- "build-storybook": "storybook build",
27
- "typecheck": "tsc --noEmit"
28
- },
29
- "dependencies": {
30
- "qrcode": "^1.5.1",
31
- "regenerator-runtime": "^0.13.11"
32
- },
33
- "devDependencies": {
34
- "@idscan/idvc2": "3.9.3",
35
- "@chromatic-com/storybook": "^5.1.2",
36
- "@idscan/eslint-config": "file:src/UI/eslint/eslint-flat",
37
- "@storybook/addon-a11y": "^10.3.5",
38
- "@storybook/addon-docs": "^10.3.5",
39
- "@storybook/html-vite": "^10.3.5",
40
- "@types/qrcode": "^1.5.0",
41
- "eslint-plugin-storybook": "^10.3.5",
42
- "msw": "^2.13.4",
43
- "msw-storybook-addon": "^2.0.7",
44
- "sass": "^1.43.5",
45
- "storybook": "^10.3.5",
46
- "typescript": "^5.0.4",
47
- "vite": "^6.3.5",
48
- "vite-plugin-checker": "^0.11.0",
49
- "vite-plugin-dts": "^4.5.4",
50
- "vite-plugin-lib-inject-css": "^2.2.2",
51
- "vite-plugin-mkcert": "^1.17.9",
52
- "vite-plugin-static-copy": "^3.1.4",
53
- "vite-plugin-string": "^1.2.3"
54
- },
55
- "author": "IDScan.net",
56
- "license": "Apache-2.0",
57
- "keywords": [
58
- "idscan",
59
- "idvc",
60
- "onboarding",
61
- "dvs",
62
- "dive",
63
- "online"
64
- ],
65
- "msw": {
66
- "workerDirectory": [
67
- ".storybook/public"
68
- ]
69
- }
70
- }
1
+ {
2
+ "name": "@idscan/onboarding",
3
+ "version": "2.11.1",
4
+ "description": "Wrapper of the IDVC library for DIVE Online.",
5
+ "main": "dist/wrapper.umd.js",
6
+ "module": "dist/wrapper.es.js",
7
+ "type": "module",
8
+ "types": "dist/Wrapper.d.ts",
9
+ "files": [
10
+ "dist/**",
11
+ ".npmignore",
12
+ "LICENSE.txt",
13
+ "README.md"
14
+ ],
15
+ "scripts": {
16
+ "start": "vite --host",
17
+ "build": "vite build",
18
+ "prod": "vite build --mode production",
19
+ "pack": "npm pack",
20
+ "patch": "npm version patch",
21
+ "lint": "eslint \"src/**/*.{js,ts,svelte}\" --ignore-pattern \"src/UI/**\"",
22
+ "lint:fix": "eslint \"src/**/*.{js,ts,svelte}\" --ignore-pattern \"src/UI/**\" --fix",
23
+ "minor": "npm version minor",
24
+ "storybook": "storybook dev -p 6006",
25
+ "build-storybook": "storybook build",
26
+ "typecheck": "svelte-check --tsconfig ./tsconfig.json",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest",
29
+ "test:coverage": "vitest run --coverage"
30
+ },
31
+ "dependencies": {
32
+ "dompurify": "^3.4.16",
33
+ "qrcode": "^1.5.1"
34
+ },
35
+ "devDependencies": {
36
+ "@chromatic-com/storybook": "^5.1.2",
37
+ "@idscan/eslint-config": "file:src/UI/eslint/eslint-flat",
38
+ "@idscan/idvc2": "^3.11.0",
39
+ "@storybook/addon-a11y": "^10.3.5",
40
+ "@storybook/addon-docs": "^10.3.5",
41
+ "@storybook/svelte-vite": "^10.3.5",
42
+ "@sveltejs/vite-plugin-svelte": "^5.1.1",
43
+ "@types/qrcode": "^1.5.0",
44
+ "@vitest/coverage-v8": "^5.0.1",
45
+ "eslint-plugin-storybook": "^10.3.5",
46
+ "eslint-plugin-svelte": "^3.23.0",
47
+ "globals": "^16.2.0",
48
+ "jsdom": "^30.1.2",
49
+ "msw": "^2.13.4",
50
+ "msw-storybook-addon": "^2.0.7",
51
+ "sass": "^1.43.5",
52
+ "storybook": "^10.3.5",
53
+ "svelte": "^5.57.1",
54
+ "svelte-check": "^4.7.6",
55
+ "typescript": "^5.0.4",
56
+ "vite": "^6.3.5",
57
+ "vite-plugin-checker": "^0.11.0",
58
+ "vite-plugin-dts": "^4.5.4",
59
+ "vite-plugin-lib-inject-css": "^2.2.2",
60
+ "vite-plugin-mkcert": "^1.17.9",
61
+ "vite-plugin-static-copy": "^3.1.4",
62
+ "vitest": "^5.0.1"
63
+ },
64
+ "author": "IDScan.net",
65
+ "license": "Apache-2.0",
66
+ "keywords": [
67
+ "idscan",
68
+ "idvc",
69
+ "onboarding",
70
+ "dvs",
71
+ "dive",
72
+ "online"
73
+ ],
74
+ "msw": {
75
+ "workerDirectory": [
76
+ ".storybook/public"
77
+ ]
78
+ }
79
+ }
package/readme.md CHANGED
@@ -73,6 +73,8 @@ Available fields:
73
73
 
74
74
  **domainApi** (string) - URL address of onboarding API. Required.
75
75
 
76
+ **apiVersion** (string) - Version of the DIVE Online API used for verification: `'v2'` (legacy API, default) or `'2-online'` (new DIVE API).
77
+
76
78
  **publicKey** (string) - DVS Web API Public Key. Required.
77
79
 
78
80
  **isAuth** (boolean) - Flag indicating that only face authentication is required.
@@ -85,7 +87,7 @@ Available fields:
85
87
 
86
88
  **useCDN** (boolean) - Flag indicating that you want to load networks from cdn instead of your domain.
87
89
 
88
- **preferApiConfig** (boolean) - Flag indicating that you prefer to use IDVC library configuration, that was sent from the DVS Online API, instead of the configuration used when initializing the wrapper.
90
+ **preferApiConfig** (boolean) - Flag indicating that you prefer to use IDVC library configuration, that was sent from the DVS Online API, instead of the configuration used when initializing the wrapper. The `networkUrl` and `chunkPublicPath` options from the wrapper config are still applied, because they depend on where the host serves the files.
89
91
 
90
92
  **hideDocumentTitle** (boolean) - This option switches on/off the displaying document titles.
91
93
 
@@ -177,8 +179,25 @@ btn.addEventListener('click', () => {
177
179
 
178
180
  **updateConfig** (string) - the method that reinitialize wrapper with new config. Parameter is an JSON encoded IDVC config. Works only in demo mode.
179
181
 
182
+ **destroy** () - the method that removes the wrapper UI (modals, consent form, QR code button), stops pending requests to DIVE Online, removes the styles (and the CDN script) added for IDVC and puts the element from the `el` option back in its place. Call it before leaving the page in single-page applications.
183
+
184
+ *Note: IDVC itself has no teardown method, so the widget (including the camera) keeps running while its element is on the page. Remove the element after `destroy()` to stop it.*
185
+
180
186
  ## Version history
181
187
 
188
+ - **2.11.1**
189
+ - chore: Updated IDVC library to 3.11.0
190
+ - changed: `captureMethod` is taken from IDVC metadata: `0` - file upload, `1` - autocapture, `2` - manual capture button
191
+ - breaking: Removed the `realFaceMode` setting and the `RealFaceMode` type, the option is no longer supported by IDVC
192
+
193
+ - **2.11.0**
194
+ - feat: Added support for the new DIVE API, set with the `apiVersion` option (DVS-4470)
195
+ - feat: Added the `destroy()` method that removes the wrapper UI and stops pending requests
196
+ - feat: Show an error modal when the IDVC library fails to load
197
+ - fix: The `networkUrl` and `chunkPublicPath` options from the wrapper config are applied when `preferApiConfig` is set
198
+ - fix: Escaped error messages from the API before showing them in the modal
199
+ - chore: Rewrote the wrapper UI (modals, consent form, QR code button) with Svelte
200
+
182
201
  - **2.10.3**
183
202
  - fix: Fixed the behavior of the `showQrCode` flag from config
184
203
  - fix: Rename loading spinner class