@regulaforensics/idv 4.0.168-rc → 4.0.290-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.
Files changed (83) hide show
  1. package/Package.swift +27 -0
  2. package/README.md +3 -0
  3. package/android/CDVIDV.kt +5 -3
  4. package/android/build.gradle.kts +41 -0
  5. package/android/cordova.gradle.kts +20 -0
  6. package/android/src/main/{java → kotlin}/com/regula/plugin/idv/RNIDVModule.kt +3 -2
  7. package/app.plugin.js +10 -7
  8. package/examples/capacitor/README.md +4 -2
  9. package/examples/capacitor/android/app/build.gradle +2 -10
  10. package/examples/capacitor/android/build.gradle +12 -3
  11. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  12. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  13. package/examples/capacitor/android/gradle.properties +4 -0
  14. package/examples/capacitor/android/gradlew +4 -7
  15. package/examples/capacitor/android/gradlew.bat +82 -94
  16. package/examples/capacitor/android/variables.gradle +13 -9
  17. package/examples/capacitor/capacitor.config.json +15 -0
  18. package/examples/capacitor/index.tsx +2 -7
  19. package/examples/capacitor/ios/App/App/AppDelegate.swift +5 -40
  20. package/examples/capacitor/ios/App/App/Info.plist +18 -2
  21. package/examples/capacitor/ios/App/App/SceneDelegate.swift +23 -0
  22. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +25 -69
  23. package/examples/capacitor/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +1 -0
  24. package/examples/capacitor/package-lock.json +392 -1493
  25. package/examples/capacitor/package.json +17 -18
  26. package/examples/capacitor/scripts/android.sh +5 -8
  27. package/examples/capacitor/scripts/ios.sh +5 -7
  28. package/examples/capacitor/scripts/setup.sh +2 -7
  29. package/examples/capacitor/src/main.css +5 -1
  30. package/examples/capacitor/src/main.tsx +51 -29
  31. package/examples/capacitor/vite.config.ts +0 -12
  32. package/examples/ionic/README.md +4 -2
  33. package/examples/ionic/config.xml +1 -1
  34. package/examples/ionic/index.tsx +8 -3
  35. package/examples/ionic/package-lock.json +8732 -7327
  36. package/examples/ionic/package.json +28 -25
  37. package/examples/ionic/scripts/android.sh +1 -3
  38. package/examples/ionic/scripts/ios.sh +3 -3
  39. package/examples/ionic/scripts/setup.sh +0 -2
  40. package/examples/ionic/src/main.tsx +51 -29
  41. package/examples/ionic/tsconfig.json +0 -1
  42. package/examples/react_native/README.md +5 -3
  43. package/examples/react_native/app.config.ts +4 -2
  44. package/examples/react_native/index.tsx +37 -7
  45. package/examples/react_native/metro.config.js +1 -3
  46. package/examples/react_native/package-lock.json +2074 -1328
  47. package/examples/react_native/package.json +19 -20
  48. package/examples/react_native/scripts/android.sh +1 -6
  49. package/examples/react_native/scripts/ios.sh +3 -9
  50. package/examples/react_native/scripts/setup.sh +2 -3
  51. package/examples/react_native/scripts/withoutMetroServer.js +86 -0
  52. package/examples/react_native/src/main.tsx +51 -29
  53. package/ios/CDVIDV.swift +23 -6
  54. package/ios/{Main.swift → Implementation.swift} +4 -4
  55. package/ios/RNIDV.swift +9 -3
  56. package/ios/Utils.swift +2 -0
  57. package/package.json +1 -1
  58. package/plugin.xml +10 -10
  59. package/react-native-idv.podspec +14 -0
  60. package/test/package-lock.json +2 -5
  61. package/test/test.tsx +26 -2
  62. package/www/capacitor/index.js +21 -3
  63. package/www/capacitor/internal/bridge.js +2 -1
  64. package/www/capacitor/internal/cordova.js +2 -2
  65. package/www/cordova.js +17 -40
  66. package/www/react-native/index.js +21 -3
  67. package/www/react-native/internal/bridge.js +2 -1
  68. package/www/types/index.d.ts +13 -2
  69. package/RNIDV.podspec +0 -21
  70. package/android/build.gradle +0 -32
  71. package/android/cordova.gradle +0 -20
  72. package/examples/capacitor/android/app/capacitor.build.gradle +0 -19
  73. package/examples/capacitor/android/capacitor.settings.gradle +0 -9
  74. package/examples/capacitor/ionic.config.json +0 -7
  75. package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +0 -19
  76. package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +0 -10
  77. package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  78. package/examples/capacitor/ios/App/Podfile +0 -29
  79. package/examples/capacitor/ios/App/Podfile.lock +0 -52
  80. package/examples/react_native/index.html +0 -12
  81. /package/android/src/main/{java/com/regula/plugin/idv/Main.kt → kotlin/com/regula/plugin/idv/Implementation.kt} +0 -0
  82. /package/android/src/main/{java → kotlin}/com/regula/plugin/idv/JSONConstructor.kt +0 -0
  83. /package/android/src/main/{java → kotlin}/com/regula/plugin/idv/Utils.kt +0 -0
package/www/cordova.js CHANGED
@@ -357,7 +357,8 @@ async function exec(name, params) {
357
357
  }
358
358
 
359
359
  function serializeInterface(value, ctor) {
360
- if (value == null) return null
360
+ if (value === undefined) return undefined
361
+ if (value === null) return null
361
362
  if (value instanceof ctor) return value.toJson()
362
363
  return (new ctor(value)).toJson()
363
364
  }
@@ -407,11 +408,11 @@ __webpack_require__.r(__webpack_exports__);
407
408
  /* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
408
409
  /* harmony export */ NativeModules: () => (/* binding */ NativeModules)
409
410
  /* harmony export */ });
410
- var _exec = (completion, params) => cordova.exec(completion, null, "IDV", "exec", params)
411
+ var _exec = (completion, params, errorCallback = null) => cordova.exec(completion, errorCallback, "IDV", "exec", params)
411
412
 
412
413
  const NativeModules = {
413
414
  RNIDV: {
414
- exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
415
+ exec: async (name, params) => new Promise((resolve, reject) => _exec(resolve, [name, ...params], error => reject(new Error(error))))
415
416
  }
416
417
  }
417
418
 
@@ -572,47 +573,24 @@ class WorkflowStep {
572
573
  /******/
573
574
  /************************************************************************/
574
575
  /******/ /* webpack/runtime/define property getters */
575
- /******/ (() => {
576
- /******/ // define getter/value functions for harmony exports
577
- /******/ __webpack_require__.d = (exports, definition) => {
578
- /******/ if(Array.isArray(definition)) {
579
- /******/ var i = 0;
580
- /******/ while(i < definition.length) {
581
- /******/ var key = definition[i++];
582
- /******/ var binding = definition[i++];
583
- /******/ if(!__webpack_require__.o(exports, key)) {
584
- /******/ if(binding === 0) {
585
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
586
- /******/ } else {
587
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
588
- /******/ }
589
- /******/ } else if(binding === 0) { i++; }
590
- /******/ }
591
- /******/ } else {
592
- /******/ for(var key in definition) {
593
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
594
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
595
- /******/ }
596
- /******/ }
576
+ /******/ // define getter/value functions for harmony exports
577
+ /******/ __webpack_require__.d = (exports, definition) => {
578
+ /******/ for(var key in definition) {
579
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
580
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
597
581
  /******/ }
598
- /******/ };
599
- /******/ })();
582
+ /******/ }
583
+ /******/ };
600
584
  /******/
601
585
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
602
- /******/ (() => {
603
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
604
- /******/ })();
586
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
605
587
  /******/
606
588
  /******/ /* webpack/runtime/make namespace object */
607
- /******/ (() => {
608
- /******/ // define __esModule on exports
609
- /******/ __webpack_require__.r = (exports) => {
610
- /******/ if(Symbol.toStringTag) {
611
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
612
- /******/ }
613
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
614
- /******/ };
615
- /******/ })();
589
+ /******/ // define __esModule on exports
590
+ /******/ __webpack_require__.r = (exports) => {
591
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
592
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
593
+ /******/ };
616
594
  /******/
617
595
  /************************************************************************/
618
596
  let __webpack_exports__ = {};
@@ -665,7 +643,6 @@ __webpack_require__.r(__webpack_exports__);
665
643
 
666
644
 
667
645
 
668
-
669
646
  class IDV {
670
647
  static get instance() { return IDV._instance }
671
648
  static _instance = new IDV()
@@ -1,4 +1,11 @@
1
- import { exec, serializeInterface, setDidStartSessionCompletion, setDidEndSessionCompletion, setDidStartRestoreSessionCompletion, setDidContinueRemoteSessionCompletion } from './internal/bridge'
1
+ import {
2
+ exec,
3
+ serializeInterface,
4
+ setDidStartSessionCompletion,
5
+ setDidEndSessionCompletion,
6
+ setDidStartRestoreSessionCompletion,
7
+ setDidContinueRemoteSessionCompletion,
8
+ } from './internal/bridge'
2
9
 
3
10
  import { TokenConnectionConfig } from './config/token_connection_config'
4
11
  import { CredentialsConnectionConfig } from './config/credentials_connection_config'
@@ -11,8 +18,19 @@ import { LoginConfig } from './config/login_config'
11
18
  import { Workflow } from './model/workflow'
12
19
  import { WorkflowResult } from './model/workflow_result'
13
20
  import { WorkflowStep } from './model/workflow_step'
14
-
15
- export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, LoginConfig, Workflow, WorkflowResult, WorkflowStep }
21
+ export {
22
+ TokenConnectionConfig,
23
+ CredentialsConnectionConfig,
24
+ ApiKeyConnectionConfig,
25
+ PrepareWorkflowConfig,
26
+ StartWorkflowConfig,
27
+ StartSessionConfig,
28
+ SendDataConfig,
29
+ LoginConfig,
30
+ Workflow,
31
+ WorkflowResult,
32
+ WorkflowStep,
33
+ }
16
34
 
17
35
  export class IDV {
18
36
  static get instance() { return IDV._instance }
@@ -8,7 +8,8 @@ export async function exec(name, params) {
8
8
  }
9
9
 
10
10
  export function serializeInterface(value, ctor) {
11
- if (value == null) return null
11
+ if (value === undefined) return undefined
12
+ if (value === null) return null
12
13
  if (value instanceof ctor) return value.toJson()
13
14
  return (new ctor(value)).toJson()
14
15
  }
@@ -9,8 +9,19 @@ import { LoginConfig } from './config/login_config'
9
9
  import { Workflow } from './model/workflow'
10
10
  import { WorkflowResult } from './model/workflow_result'
11
11
  import { WorkflowStep } from './model/workflow_step'
12
-
13
- export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, LoginConfig, Workflow, WorkflowResult, WorkflowStep }
12
+ export {
13
+ TokenConnectionConfig,
14
+ CredentialsConnectionConfig,
15
+ ApiKeyConnectionConfig,
16
+ PrepareWorkflowConfig,
17
+ StartWorkflowConfig,
18
+ StartSessionConfig,
19
+ SendDataConfig,
20
+ LoginConfig,
21
+ Workflow,
22
+ WorkflowResult,
23
+ WorkflowStep,
24
+ }
14
25
 
15
26
  /**
16
27
  * Entry point of the Regula IDV.
package/RNIDV.podspec DELETED
@@ -1,21 +0,0 @@
1
- require 'json'
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
- source = File.join(__dir__, 'ios')
5
-
6
- Pod::Spec.new do |s|
7
- s.name = 'RNIDV'
8
- s.version = '4.0.168-rc'
9
- s.summary = package['description']
10
- s.license = package['license']
11
-
12
- s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
13
- s.homepage = 'https://regulaforensics.com'
14
-
15
- s.source = { http: "file:#{source}" }
16
- s.ios.deployment_target = '14.0'
17
- s.source_files = [ 'ios/**/*.swift', 'ios/**/RN*.m' ]
18
- s.exclude_files = [ 'ios/CDVIDV.swift' ]
19
- s.dependency 'IDVSDKStage', '4.0.1999'
20
- s.dependency 'React'
21
- end
@@ -1,32 +0,0 @@
1
- apply plugin: 'com.android.library'
2
- apply plugin: 'kotlin-android'
3
- apply plugin: 'kotlin-kapt'
4
-
5
- android {
6
- namespace 'com.regula.plugin.idv'
7
- compileSdk 36
8
-
9
- defaultConfig {
10
- minSdkVersion 24
11
- }
12
-
13
- buildFeatures {
14
- dataBinding true
15
- }
16
- }
17
-
18
- rootProject.allprojects {
19
- repositories {
20
- maven {
21
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
22
- }
23
- }
24
- }
25
-
26
- dependencies {
27
- implementation 'com.facebook.react:react-native:+'
28
- implementation('com.regula.idv:api:4.0.371') {
29
- transitive = true
30
- }
31
- }
32
-
@@ -1,20 +0,0 @@
1
- apply plugin: 'kotlin-android'
2
- apply plugin: 'kotlin-kapt'
3
-
4
- android {
5
- buildFeatures {
6
- dataBinding true
7
- }
8
- }
9
-
10
- repositories {
11
- maven {
12
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
13
- }
14
- }
15
-
16
- dependencies {
17
- implementation('com.regula.idv:api:4.0.371') {
18
- transitive = true
19
- }
20
- }
@@ -1,19 +0,0 @@
1
- // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2
-
3
- android {
4
- compileOptions {
5
- sourceCompatibility JavaVersion.VERSION_21
6
- targetCompatibility JavaVersion.VERSION_21
7
- }
8
- }
9
-
10
- apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11
- dependencies {
12
- implementation project(':capacitor-app')
13
- implementation project(':capacitor-status-bar')
14
-
15
- }
16
-
17
- if (hasProperty('postBuildExtras')) {
18
- postBuildExtras()
19
- }
@@ -1,9 +0,0 @@
1
- // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2
- include ':capacitor-android'
3
- project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
4
-
5
- include ':capacitor-app'
6
- project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
7
-
8
- include ':capacitor-status-bar'
9
- project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
@@ -1,7 +0,0 @@
1
- {
2
- "name": "IDV",
3
- "integrations": {
4
- "capacitor": {}
5
- },
6
- "type": "react-vite"
7
- }
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3
- <device id="retina4_7" orientation="portrait">
4
- <adaptation id="fullscreen"/>
5
- </device>
6
- <dependencies>
7
- <deployment identifier="iOS"/>
8
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9
- </dependencies>
10
- <scenes>
11
- <!--Bridge View Controller-->
12
- <scene sceneID="tne-QT-ifu">
13
- <objects>
14
- <viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
15
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
16
- </objects>
17
- </scene>
18
- </scenes>
19
- </document>
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "group:App.xcodeproj">
6
- </FileRef>
7
- <FileRef
8
- location = "group:Pods/Pods.xcodeproj">
9
- </FileRef>
10
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,29 +0,0 @@
1
- source 'https://github.com/CocoaPods/Specs.git'
2
- source 'https://github.com/regulaforensics/podspecs.git'
3
-
4
- require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
5
-
6
- platform :ios, '15.0'
7
- use_frameworks!
8
-
9
- # workaround to avoid Xcode caching of Pods that requires
10
- # Product -> Clean Build Folder after new Cordova plugins installed
11
- # Requires CocoaPods 1.6 or newer
12
- install! 'cocoapods', :disable_input_output_paths => true
13
-
14
- def capacitor_pods
15
- pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
16
- pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
17
- pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
18
- pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
19
- pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
20
- end
21
-
22
- target 'App' do
23
- capacitor_pods
24
- # Add your Pods here
25
- end
26
-
27
- post_install do |installer|
28
- assertDeploymentTarget(installer)
29
- end
@@ -1,52 +0,0 @@
1
- PODS:
2
- - Capacitor (8.0.2):
3
- - CapacitorCordova
4
- - CapacitorApp (8.0.0):
5
- - Capacitor
6
- - CapacitorCordova (8.0.2)
7
- - CapacitorStatusBar (8.0.0):
8
- - Capacitor
9
- - CordovaPlugins (8.0.2):
10
- - CapacitorCordova
11
-
12
- DEPENDENCIES:
13
- - "Capacitor (from `../../node_modules/@capacitor/ios`)"
14
- - "CapacitorApp (from `../../node_modules/@capacitor/app`)"
15
- - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
16
- - "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
17
- - CordovaPlugins (from `../capacitor-cordova-ios-plugins`)
18
-
19
- SPEC REPOS:
20
- https://github.com/CocoaPods/Specs.git:
21
- - DocumentReader
22
- - DocumentReaderFullAuthRFID
23
- - FaceCoreBasic
24
- - FaceSDK
25
- - IDVDocumentReader
26
- - IDVFaceSDK
27
- - IDVModule
28
- - IDVSDK
29
- - RegulaCommon
30
-
31
- EXTERNAL SOURCES:
32
- Capacitor:
33
- :path: "../../node_modules/@capacitor/ios"
34
- CapacitorApp:
35
- :path: "../../node_modules/@capacitor/app"
36
- CapacitorCordova:
37
- :path: "../../node_modules/@capacitor/ios"
38
- CapacitorStatusBar:
39
- :path: "../../node_modules/@capacitor/status-bar"
40
- CordovaPlugins:
41
- :path: "../capacitor-cordova-ios-plugins"
42
-
43
- SPEC CHECKSUMS:
44
- Capacitor: 2b79172ad27f3be2d103cce88b8eb9803fdcc744
45
- CapacitorApp: 3963a84197280757b84f126afd1520a85ae3b092
46
- CapacitorCordova: 921bdb690ebe82421b24fce45552fd3dea2ae43a
47
- CapacitorStatusBar: 312e2e67928dfe9514c4a8916a1fd610552f5f35
48
- CordovaPlugins: 7f5a9e789a8a2a94e03ada0b30c39133218f5f2a
49
-
50
- PODFILE CHECKSUM: 37237f8392a5e6d203bec0893d4e0d5eab43f1ce
51
-
52
- COCOAPODS: 1.16.2
@@ -1,12 +0,0 @@
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>