@regulaforensics/idv 3.10.271-nightly → 3.10.272-rc

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.
@@ -7,11 +7,11 @@
7
7
  "postinstall": "patch-package"
8
8
  },
9
9
  "dependencies": {
10
- "@regulaforensics/idv": "3.10.271-nightly",
11
- "@regulaforensics/idv-module-document-reader": "3.10.398-nightly",
12
- "@regulaforensics/idv-module-face": "3.10.399-nightly",
13
- "@regulaforensics/document-reader-core-fullauthrfid": "9.10.3442-nightly",
14
- "@regulaforensics/face-core-basic": "8.5.913-nightly",
10
+ "@regulaforensics/idv": "3.10.272-rc",
11
+ "@regulaforensics/idv-module-document-reader": "3.10.400-rc",
12
+ "@regulaforensics/idv-module-face": "3.10.401-rc",
13
+ "@regulaforensics/document-reader-core-fullauthrfid": "9.10.3427-rc",
14
+ "@regulaforensics/face-core-basic": "8.5.909-rc",
15
15
  "@angular-devkit/build-angular": "^22.1.8",
16
16
  "@angular/cli": "^22.1.8",
17
17
  "@angular/common": "^22.1.7",
@@ -32,10 +32,8 @@
32
32
  "typescript": "~6.0.3"
33
33
  },
34
34
  "overrides": {
35
- "serialize-javascript": "^7.1.2",
36
- "uuid": "^11.1.1",
37
- "source-map-js": "^1.2.2",
38
- "shell-quote": "^1.11.0"
35
+ "serialize-javascript": "^7.1.1",
36
+ "uuid": "^11.1.1"
39
37
  },
40
38
  "cordova": {
41
39
  "plugins": {
@@ -36,19 +36,17 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
36
36
  },
37
37
  plugins: [
38
38
  '@regulaforensics/idv',
39
- './scripts/withoutMetroServer',
40
39
  ['expo-custom-assets', { assetsPaths: ['./assets'] }],
41
40
  ['expo-build-properties', {
42
- ios: { networkInspector: false },
43
41
  android: {
44
- networkInspector: false,
45
42
  extraMavenRepos: [
46
43
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader' },
47
44
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Beta' },
48
45
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Nightly' },
49
46
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Stage' }
50
47
  ]
51
- }
48
+ },
49
+ ios: { networkInspector: false }
52
50
  }]
53
51
  ]
54
52
  })
@@ -0,0 +1,12 @@
1
+ <meta name="viewport" content="initial-scale=1, user-scalable=no, viewport-fit=cover">
2
+ <link rel="stylesheet" href="src/main.css">
3
+
4
+ <div id="content" style="height: 100%"></div>
5
+
6
+ <script>
7
+ (async () => {
8
+ document.getElementById("content").innerHTML = await fetch("src/main.html").then(r => r.text())
9
+ await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))
10
+ window.ReactNativeWebView.postMessage(JSON.stringify({ id: "ready" }))
11
+ })()
12
+ </script>
@@ -1,8 +1,6 @@
1
1
  import { registerRootComponent } from 'expo'
2
2
  import WebView from 'react-native-webview'
3
3
  import React from 'react'
4
- import * as RNFS from 'react-native-fs'
5
- import { Platform } from 'react-native'
6
4
  import { main } from './src/main'
7
5
 
8
6
  var webViewRef: any
@@ -49,45 +47,17 @@ const document = {
49
47
  }
50
48
 
51
49
  function parseValue(value: any) {
52
- const json = JSON.stringify(value)
53
- return typeof value === 'string' ? `(window.webImages[${json}] ?? ${json})` : json
54
- }
55
-
56
- async function loadWebUI() {
57
- const webRoot = Platform.OS === 'ios' ? RNFS.MainBundlePath + '/web/' : 'web/'
58
- const readWebFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileAssets
59
- const readWebDir = Platform.OS === 'ios' ? RNFS.readDir : RNFS.readDirAssets
60
- const webImages: Record<string, string> = {}
61
- const [styles, content] = await Promise.all(['src/main.css', 'src/main.html'].map(path => readWebFile(webRoot + path, 'utf8')))
62
-
63
- for (const file of (await readWebDir(webRoot + 'images')).filter(file => file.isFile())) {
64
- const extension = file.name.split('.').pop()!.toLowerCase()
65
- const type = ({ jpg: 'jpeg', svg: 'svg+xml' } as Record<string, string>)[extension] ?? extension
66
- webImages['images/' + file.name] = `data:image/${type};base64,${await readWebFile(file.path, 'base64')}`
67
- }
68
-
69
- const html = content.replace(/src="([^"]+)"/g, (match, path) => webImages[path] ? `src="${webImages[path]}"` : match)
70
- return `<meta name="viewport" content="initial-scale=1, user-scalable=no, viewport-fit=cover">
71
- <style>${styles}</style>
72
- <div id="content" style="height: 100%">${html}</div>
73
- <script>
74
- window.webImages = ${JSON.stringify(webImages)};
75
- requestAnimationFrame(() => requestAnimationFrame(() => {
76
- window.ReactNativeWebView.postMessage(JSON.stringify({ id: "ready" }))
77
- }))
78
- </script>`
50
+ if (value !== true && value !== false) return `"${value}"`
51
+ return value
79
52
  }
80
53
 
81
54
  (globalThis as any).document = document;
82
- registerRootComponent(() => {
83
- const [html, setHtml] = React.useState('')
84
- React.useEffect(() => { loadWebUI().then(setHtml).catch(console.error) }, [])
85
- return html ? <WebView
55
+ registerRootComponent(() =>
56
+ <WebView
86
57
  ref={ref => { webViewRef = ref }}
87
58
  onMessage={onMessage}
88
- originWhitelist={['*']}
89
- source={{ html }}
59
+ source={require("./index.html")}
90
60
  scrollEnabled={false}
91
61
  overScrollMode={'content'}
92
- /> : null
93
- })
62
+ />
63
+ )
@@ -1,5 +1,7 @@
1
1
  const config = require('expo/metro-config').getDefaultConfig(__dirname)
2
2
  config.watchFolders = [
3
+ __dirname + '/node_modules'
3
4
  ]
4
- config.resolver.nodeModulesPaths = [__dirname + '/node_modules']
5
+ config.resolver.nodeModulesPaths = config.watchFolders
6
+ config.resolver.assetExts.push('css')
5
7
  module.exports = config