@regulaforensics/vp-frontend-document-components 1.2.0 → 2.0.0

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.
Files changed (91) hide show
  1. package/README.md +660 -81
  2. package/dist/main.js +1 -1
  3. package/dist/main.js.LICENSE.txt +41 -0
  4. package/esm/main.js +2 -0
  5. package/esm/main.js.LICENSE.txt +41 -0
  6. package/lib/common/BackCameraIcon.d.ts +6 -0
  7. package/lib/common/Button.d.ts +7 -0
  8. package/lib/common/CameraChangeIcon.d.ts +6 -0
  9. package/lib/common/CameraIcon.d.ts +6 -0
  10. package/lib/common/CheckIcon.d.ts +6 -0
  11. package/lib/common/CrossIcon.d.ts +6 -0
  12. package/lib/common/DocReaderCameraDisabled.d.ts +5 -0
  13. package/lib/common/DocReaderCameraPreparing.d.ts +5 -0
  14. package/lib/common/DocReaderFlip.d.ts +5 -0
  15. package/lib/common/DocReaderProcessing.d.ts +5 -0
  16. package/lib/common/DocReaderProcessingError.d.ts +5 -0
  17. package/lib/common/DocReaderProcessingFinished.d.ts +6 -0
  18. package/lib/common/DocReaderSearch.d.ts +5 -0
  19. package/lib/common/ErrorIcon.d.ts +6 -0
  20. package/lib/common/FromCameraIcon.d.ts +5 -0
  21. package/lib/common/FromGalleryIcon.d.ts +5 -0
  22. package/lib/common/FrontCameraIcon.d.ts +6 -0
  23. package/lib/common/FullscreenExitIcon.d.ts +6 -0
  24. package/lib/common/FullscreenIcon.d.ts +6 -0
  25. package/lib/common/Icon.d.ts +7 -0
  26. package/lib/common/InstructionIconFaceDetection.d.ts +5 -0
  27. package/lib/common/InstructionIconFaceLiveness.d.ts +5 -0
  28. package/lib/common/Message.d.ts +7 -0
  29. package/lib/common/NoGlareIcon.d.ts +5 -0
  30. package/lib/common/NoSmilingIcon.d.ts +5 -0
  31. package/lib/common/RegulaLogo.d.ts +6 -0
  32. package/lib/common/SnapshotIcon.d.ts +6 -0
  33. package/lib/common/Spinner.d.ts +3 -0
  34. package/lib/common/SquareIcon.d.ts +6 -0
  35. package/lib/common/StopIcon.d.ts +6 -0
  36. package/lib/common/VerifiedIcon.d.ts +6 -0
  37. package/lib/components/CameraCapture.d.ts +9 -0
  38. package/lib/components/CameraSnapshot.d.ts +2 -0
  39. package/lib/components/CameraSnapshotFileCapture.d.ts +10 -0
  40. package/lib/components/DocumentCapture.d.ts +10 -0
  41. package/lib/components/DocumentFullScreenOverlay.d.ts +11 -0
  42. package/lib/components/DocumentReader.d.ts +2 -0
  43. package/lib/components/DocumentReaderFileCapture.d.ts +12 -0
  44. package/lib/components/DocumentReaderLayout.d.ts +22 -0
  45. package/lib/components/DocumentReaderStartScreen.d.ts +10 -0
  46. package/lib/components/ErrorBoundary.d.ts +18 -0
  47. package/lib/components/FaceCapture.d.ts +15 -0
  48. package/lib/components/FaceDetection.d.ts +2 -0
  49. package/lib/components/FaceFullScreenOverlay.d.ts +11 -0
  50. package/lib/components/FaceLayout.d.ts +18 -0
  51. package/lib/components/FaceLiveness.d.ts +2 -0
  52. package/lib/components/InfoScreen.d.ts +10 -0
  53. package/lib/components/InstructionScreen.d.ts +9 -0
  54. package/lib/components/ProcessScreen.d.ts +6 -0
  55. package/lib/components/RetryScreen.d.ts +7 -0
  56. package/lib/components/WebCamera.d.ts +19 -0
  57. package/lib/constants.d.ts +568 -0
  58. package/lib/contexts/DocumentAttributesContext.d.ts +24 -0
  59. package/lib/contexts/DocumentSDKContext.d.ts +6 -0
  60. package/lib/contexts/FaceAttributesContext.d.ts +21 -0
  61. package/lib/hoc/withDocumentAttributesContext.d.ts +4 -0
  62. package/lib/hoc/withDocumentSDKContext.d.ts +3 -0
  63. package/lib/hoc/withFaceAttributesContext.d.ts +4 -0
  64. package/lib/hoc/withLocalize.d.ts +7 -0
  65. package/lib/hooks/useDocumentReaderSeries.d.ts +25 -0
  66. package/lib/hooks/useDocumentReaderSingle.d.ts +15 -0
  67. package/lib/hooks/useFaceLiveness.d.ts +30 -0
  68. package/lib/hooks/useImageInputParam.d.ts +9 -0
  69. package/lib/hooks/useOrientationChange.d.ts +10 -0
  70. package/lib/hooks/useStream.d.ts +10 -0
  71. package/lib/hooks/useUserAgent.d.ts +3 -0
  72. package/lib/hooks/useWindowBlur.d.ts +2 -0
  73. package/lib/i18n/dictionaries/_dictionaries.d.ts +2115 -0
  74. package/lib/index-document.d.ts +5 -0
  75. package/lib/models/CameraModel.d.ts +9 -0
  76. package/lib/models/CustomError.d.ts +7 -0
  77. package/lib/models/ImageModel.d.ts +7 -0
  78. package/lib/services/DebugService.d.ts +13 -0
  79. package/lib/services/DocumentReaderProcessor.d.ts +53 -0
  80. package/lib/services/DocumentReaderService.d.ts +44 -0
  81. package/lib/services/EventEmitter.d.ts +9 -0
  82. package/lib/services/FaceLivenessService.d.ts +43 -0
  83. package/lib/services/FaceService.d.ts +12 -0
  84. package/lib/types.d.ts +323 -0
  85. package/lib/utils.d.ts +27 -0
  86. package/lib/web-components/CameraSnapshot.d.ts +11 -0
  87. package/lib/web-components/DocumentReader.d.ts +11 -0
  88. package/lib/web-components/FaceDetection.d.ts +11 -0
  89. package/lib/web-components/FaceLiveness.d.ts +14 -0
  90. package/lib/web-components/FullScreenContainer.d.ts +4 -0
  91. package/package.json +63 -69
package/package.json CHANGED
@@ -1,105 +1,99 @@
1
1
  {
2
2
  "name": "@regulaforensics/vp-frontend-document-components",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "description": "Regula framework agnostic web components to work with webcamera",
5
+ "types": "lib/types.d.ts",
5
6
  "main": "dist/main.js",
7
+ "module": "esm/main.js",
6
8
  "files": [
7
- "./dist/*"
9
+ "dist",
10
+ "esm",
11
+ "lib"
8
12
  ],
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/regulaforensics/vp-frontend-components.git"
12
- },
13
13
  "author": "Regula Forensics, Inc.",
14
14
  "license": "MIT",
15
- "bugs": {
16
- "url": "https://github.com/regulaforensics/vp-frontend-components/issues"
17
- },
18
15
  "homepage": "https://storybook-document.regulaforensics.com/",
19
16
  "scripts": {
20
17
  "start": "webpack serve --config webpack.dev.js",
21
- "build": "webpack --config webpack.prod.js",
22
- "build-face": "webpack --config webpack.face.js",
23
- "build-document": "webpack --config webpack.document.js",
24
- "storybook": "start-storybook -p 6006 -c .storybook-development",
18
+ "build-face": "npm run clean-lib && npm run generate-face-types && webpack --config webpack.face-umd.js",
19
+ "build-document": "npm run clean-lib && npm run generate-document-types && webpack --config webpack.document-umd.js && webpack --config webpack.document-esm.js",
20
+ "storybook": "start-storybook -p 6006 -c .storybook-development -h localhost",
25
21
  "build-storybook-development": "build-storybook -c .storybook-development",
26
22
  "build-storybook-nightly": "build-storybook -c .storybook-nightly",
27
23
  "build-storybook-face-rc": "build-storybook -c .storybook-rc/face",
28
24
  "build-storybook-document-rc": "build-storybook -c .storybook-rc/document",
29
25
  "build-storybook-face-release": "build-storybook -c .storybook-release/face",
30
26
  "build-storybook-document-release": "build-storybook -c .storybook-release/document",
31
- "generate-dictionaries": "node scripts/xml-dictionary-parser/index.js Translator.xml src/i18n/dictionaries"
32
- },
33
- "husky": {
34
- "hooks": {
35
- "pre-commit": "lint-staged"
36
- }
27
+ "generate-dictionaries": "node scripts/xml-dictionary-parser/index.js Translator.xml src/i18n/dictionaries",
28
+ "clean-lib": "rm -rf ./lib",
29
+ "generate-face-types": "tsc --project ./configs/face.tsconfig.json",
30
+ "generate-document-types": "tsc --project ./configs/document.tsconfig.json",
31
+ "prepare": "husky install",
32
+ "check-types": "tsc --noEmit"
37
33
  },
38
34
  "lint-staged": {
39
- "*.{js,ts,tsx}": "eslint --cache --fix"
35
+ "*.{js,ts,tsx}": "eslint --fix"
40
36
  },
41
37
  "dependencies": {
42
- "@regulaforensics/document-reader-webclient": "^5.6.6",
43
- "@regulaforensics/facesdk-webclient": "^3.1.0",
44
- "@webcomponents/webcomponentsjs": "^2.5.0",
45
- "axios": "^0.21.1",
46
- "base64-arraybuffer": "^0.2.0",
38
+ "@regulaforensics/document-reader-webclient": "^6.3.2",
39
+ "@regulaforensics/facesdk-webclient": "^3.1.2",
40
+ "@webcomponents/webcomponentsjs": "^2.6.0",
47
41
  "localize-react": "^1.7.1",
48
- "react": "^17.0.1",
49
- "react-device-detect": "^2.1.2",
50
- "react-dom": "^17.0.1",
51
- "react-json-view": "^1.21.3",
52
- "uuid": "^8.3.2",
53
- "wasm-feature-detect": "^1.2.11"
42
+ "react": "^18.2.0",
43
+ "react-device-detect": "^2.2.2",
44
+ "react-dom": "^18.2.0",
45
+ "uuid": "^9.0.0"
54
46
  },
55
47
  "devDependencies": {
56
- "@babel/core": "^7.12.10",
57
- "@babel/plugin-transform-runtime": "^7.12.10",
58
- "@babel/preset-env": "^7.12.11",
59
- "@babel/preset-react": "^7.12.10",
60
- "@babel/preset-typescript": "^7.12.7",
61
- "@babel/runtime": "^7.12.5",
48
+ "@babel/core": "^7.19.1",
49
+ "@babel/plugin-transform-runtime": "^7.19.1",
50
+ "@babel/preset-env": "^7.19.1",
51
+ "@babel/preset-react": "^7.18.6",
52
+ "@babel/preset-typescript": "^7.18.6",
53
+ "@babel/runtime": "^7.19.0",
62
54
  "@regulaforensics/vp-frontend-document-components": "*",
63
55
  "@regulaforensics/vp-frontend-document-components-nightly": "*",
64
56
  "@regulaforensics/vp-frontend-document-components-rc": "*",
65
57
  "@regulaforensics/vp-frontend-face-components": "*",
66
58
  "@regulaforensics/vp-frontend-face-components-nightly": "*",
67
59
  "@regulaforensics/vp-frontend-face-components-rc": "*",
68
- "@storybook/addon-actions": "6.2.9",
69
- "@storybook/addon-essentials": "6.2.9",
70
- "@storybook/addon-links": "6.2.9",
71
- "@storybook/builder-webpack5": "^6.3.0-beta.4",
72
- "@storybook/react": "6.2.9",
73
- "@types/react": "^17.0.0",
74
- "@types/react-dom": "^17.0.0",
75
- "@types/uuid": "^8.3.0",
76
- "@types/webpack": "^4.41.26",
77
- "@types/webpack-dev-server": "^3.11.1",
78
- "@typescript-eslint/eslint-plugin": "^4.14.0",
79
- "@typescript-eslint/parser": "^4.14.0",
80
- "babel-loader": "^8.2.2",
81
- "css-loader": "^5.0.1",
82
- "dotenv-webpack": "^7.0.2",
83
- "eslint": "^7.18.0",
84
- "eslint-config-prettier": "^7.2.0",
85
- "eslint-plugin-prettier": "^3.3.1",
86
- "eslint-plugin-react": "^7.22.0",
87
- "fast-xml-parser": "^3.19.0",
60
+ "@storybook/addon-actions": "^6.5.13",
61
+ "@storybook/addon-essentials": "^6.5.13",
62
+ "@storybook/addon-links": "^6.5.13",
63
+ "@storybook/builder-webpack5": "^6.5.13",
64
+ "@storybook/manager-webpack5": "^6.5.13",
65
+ "@storybook/react": "^6.5.13",
66
+ "@types/pako": "^1.0.3",
67
+ "@types/react": "^18.0.21",
68
+ "@types/react-dom": "^18.0.6",
69
+ "@types/uuid": "^8.3.4",
70
+ "@typescript-eslint/eslint-plugin": "^5.38.0",
71
+ "@typescript-eslint/parser": "^5.38.0",
72
+ "babel-loader": "^8.2.5",
73
+ "base64-arraybuffer": "^1.0.2",
74
+ "css-loader": "^6.7.1",
75
+ "dotenv-webpack": "^8.0.1",
76
+ "eslint": "^8.24.0",
77
+ "eslint-config-prettier": "^8.5.0",
78
+ "eslint-plugin-prettier": "^4.2.1",
79
+ "eslint-plugin-react": "^7.31.8",
80
+ "fast-xml-parser": "^4.0.10",
88
81
  "he": "^1.2.0",
89
- "html-webpack-plugin": "^5.3.1",
90
- "husky": "^4.3.8",
91
- "lint-staged": "^10.5.3",
92
- "prettier": "^2.2.1",
82
+ "html-webpack-plugin": "^5.5.0",
83
+ "husky": "^8.0.0",
84
+ "lint-staged": "^13.0.3",
85
+ "prettier": "^2.7.1",
86
+ "react-json-view": "^1.21.3",
93
87
  "style-loader": "^2.0.0",
94
- "terser-webpack-plugin": "^5.3.0",
95
- "to-string-loader": "^1.1.6",
96
- "ts-loader": "^8.0.14",
97
- "typescript": "^4.1.3",
88
+ "terser-webpack-plugin": "^5.3.6",
89
+ "to-string-loader": "^1.2.0",
90
+ "ts-loader": "^9.4.1",
91
+ "typescript": "<4.8",
98
92
  "url-loader": "^4.1.1",
99
- "webpack": "^5.17.0",
100
- "webpack-cli": "^4.4.0",
101
- "webpack-dev-server": "^3.11.2",
102
- "webpack-merge": "^5.7.3",
93
+ "webpack": "^5.74.0",
94
+ "webpack-cli": "^4.10.0",
95
+ "webpack-dev-server": "^4.11.1",
96
+ "webpack-merge": "^5.8.0",
103
97
  "worker-loader": "^3.0.8"
104
98
  }
105
99
  }