@regulaforensics/idv 3.2.23-beta
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/README.md +36 -0
- package/RNIDV.podspec +21 -0
- package/android/CVDIDV.kt +48 -0
- package/android/build.gradle +41 -0
- package/android/cordova.gradle +20 -0
- package/android/src/main/java/com/regula/plugin/idv/JSONConstructor.kt +135 -0
- package/android/src/main/java/com/regula/plugin/idv/Main.kt +124 -0
- package/android/src/main/java/com/regula/plugin/idv/RNIDVModule.kt +71 -0
- package/android/src/main/java/com/regula/plugin/idv/Utils.kt +60 -0
- package/examples/capacitor/README.md +15 -0
- package/examples/capacitor/android/app/build.gradle +50 -0
- package/examples/capacitor/android/app/capacitor.build.gradle +22 -0
- package/examples/capacitor/android/app/proguard-rules.pro +21 -0
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +26 -0
- package/examples/capacitor/android/app/src/main/assets/Regula/.gitkeep +0 -0
- package/examples/capacitor/android/app/src/main/java/com/regula/example/idv/capacitor/MainActivity.java +5 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable/launcher.xml +4 -0
- package/examples/capacitor/android/app/src/main/res/drawable/launcher_round.xml +4 -0
- package/examples/capacitor/android/app/src/main/res/drawable/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/examples/capacitor/android/app/src/main/res/values/styles.xml +22 -0
- package/examples/capacitor/android/build.gradle +30 -0
- package/examples/capacitor/android/capacitor.settings.gradle +15 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/examples/capacitor/android/gradle.properties +22 -0
- package/examples/capacitor/android/gradlew +252 -0
- package/examples/capacitor/android/gradlew.bat +94 -0
- package/examples/capacitor/android/settings.gradle +5 -0
- package/examples/capacitor/android/variables.gradle +16 -0
- package/examples/capacitor/index.html +5 -0
- package/examples/capacitor/index.tsx +16 -0
- package/examples/capacitor/ionic.config.json +7 -0
- package/examples/capacitor/ios/App/App/App.entitlements +10 -0
- package/examples/capacitor/ios/App/App/AppDelegate.swift +49 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/examples/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/examples/capacitor/ios/App/App/Info.plist +65 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +414 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
- package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/examples/capacitor/ios/App/Podfile +26 -0
- package/examples/capacitor/package.json +27 -0
- package/examples/capacitor/public/assets/.gitkeep +0 -0
- package/examples/capacitor/scripts/android.sh +9 -0
- package/examples/capacitor/scripts/ios.sh +8 -0
- package/examples/capacitor/scripts/setup.sh +14 -0
- package/examples/capacitor/src/main.css +148 -0
- package/examples/capacitor/src/main.html +38 -0
- package/examples/capacitor/src/main.tsx +10 -0
- package/examples/capacitor/tsconfig.json +5 -0
- package/examples/capacitor/vite.config.ts +17 -0
- package/examples/ionic/README.md +15 -0
- package/examples/ionic/angular.json +39 -0
- package/examples/ionic/assets/.gitkeep +0 -0
- package/examples/ionic/config.xml +59 -0
- package/examples/ionic/images/icon.png +0 -0
- package/examples/ionic/index.html +19 -0
- package/examples/ionic/index.tsx +28 -0
- package/examples/ionic/ionic.config.json +7 -0
- package/examples/ionic/package.json +46 -0
- package/examples/ionic/scripts/android.sh +8 -0
- package/examples/ionic/scripts/ios.sh +8 -0
- package/examples/ionic/scripts/setup.sh +8 -0
- package/examples/ionic/src/main.css +148 -0
- package/examples/ionic/src/main.html +38 -0
- package/examples/ionic/src/main.tsx +10 -0
- package/examples/ionic/tsconfig.json +14 -0
- package/examples/react_native/README.md +15 -0
- package/examples/react_native/app.config.ts +46 -0
- package/examples/react_native/assets/.gitkeep +0 -0
- package/examples/react_native/images/icon.png +0 -0
- package/examples/react_native/index.html +11 -0
- package/examples/react_native/index.tsx +63 -0
- package/examples/react_native/metro.config.js +7 -0
- package/examples/react_native/package.json +29 -0
- package/examples/react_native/scripts/android.sh +13 -0
- package/examples/react_native/scripts/ios.sh +12 -0
- package/examples/react_native/scripts/setup.sh +9 -0
- package/examples/react_native/src/main.css +148 -0
- package/examples/react_native/src/main.html +38 -0
- package/examples/react_native/src/main.tsx +10 -0
- package/ios/CVDIDV.swift +72 -0
- package/ios/FlutterIDVPlugin.swift +72 -0
- package/ios/JSONConstructor.swift +134 -0
- package/ios/Main.swift +89 -0
- package/ios/RNIDV.swift +72 -0
- package/ios/Utils.swift +56 -0
- package/package.json +38 -0
- package/plugin.xml +45 -0
- package/test/json.tsx +0 -0
- package/test/package-lock.json +584 -0
- package/test/package.json +9 -0
- package/test/test.tsx +3 -0
- package/test/utils.tsx +38 -0
- package/www/capacitor/index.js +6 -0
- package/www/capacitor/internal/bridge.js +19 -0
- package/www/capacitor/internal/cordova.js +17 -0
- package/www/cordova.js +150 -0
- package/www/react-native/index.js +6 -0
- package/www/react-native/internal/bridge.js +19 -0
- package/www/types/index.d.ts +12 -0
package/www/cordova.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ "./src/internal/bridge.js":
|
|
6
|
+
/*!********************************!*\
|
|
7
|
+
!*** ./src/internal/bridge.js ***!
|
|
8
|
+
\********************************/
|
|
9
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10
|
+
|
|
11
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13
|
+
/* harmony export */ exec: () => (/* binding */ exec)
|
|
14
|
+
/* harmony export */ });
|
|
15
|
+
/* harmony import */ var _cordova__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cordova */ "./src/internal/cordova.js");
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const { RNIDV } = _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeModules
|
|
19
|
+
var eventManager = new _cordova__WEBPACK_IMPORTED_MODULE_0__.NativeEventEmitter(RNIDV)
|
|
20
|
+
|
|
21
|
+
async function exec(name, params) {
|
|
22
|
+
return RNIDV.exec(name, params)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function _setEvent(id, completion, fromJson) {
|
|
26
|
+
eventManager.removeAllListeners(id)
|
|
27
|
+
if (completion == null) return
|
|
28
|
+
if (fromJson == null) eventManager.addListener(id, completion)
|
|
29
|
+
else eventManager.addListener(id, data => {
|
|
30
|
+
data = fromJson(data)
|
|
31
|
+
if (data !== null && typeof data[Symbol.iterator] === 'function') completion(...data)
|
|
32
|
+
else completion(data)
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/***/ }),
|
|
38
|
+
|
|
39
|
+
/***/ "./src/internal/cordova.js":
|
|
40
|
+
/*!*********************************!*\
|
|
41
|
+
!*** ./src/internal/cordova.js ***!
|
|
42
|
+
\*********************************/
|
|
43
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
44
|
+
|
|
45
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47
|
+
/* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
|
|
48
|
+
/* harmony export */ NativeModules: () => (/* binding */ NativeModules)
|
|
49
|
+
/* harmony export */ });
|
|
50
|
+
var _exec = (completion, params) => cordova.exec(completion, null, "IDV", "exec", params)
|
|
51
|
+
|
|
52
|
+
const NativeModules = {
|
|
53
|
+
RNIDV: {
|
|
54
|
+
exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
class NativeEventEmitter {
|
|
59
|
+
addListener(id, completion) {
|
|
60
|
+
_exec(completion, ["setEvent", id])
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
removeAllListeners(id) {
|
|
64
|
+
_exec(null, ["setEvent", id])
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/***/ })
|
|
69
|
+
|
|
70
|
+
/******/ });
|
|
71
|
+
/************************************************************************/
|
|
72
|
+
/******/ // The module cache
|
|
73
|
+
/******/ var __webpack_module_cache__ = {};
|
|
74
|
+
/******/
|
|
75
|
+
/******/ // The require function
|
|
76
|
+
/******/ function __webpack_require__(moduleId) {
|
|
77
|
+
/******/ // Check if module is in cache
|
|
78
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
79
|
+
/******/ if (cachedModule !== undefined) {
|
|
80
|
+
/******/ return cachedModule.exports;
|
|
81
|
+
/******/ }
|
|
82
|
+
/******/ // Create a new module (and put it into the cache)
|
|
83
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
84
|
+
/******/ // no module.id needed
|
|
85
|
+
/******/ // no module.loaded needed
|
|
86
|
+
/******/ exports: {}
|
|
87
|
+
/******/ };
|
|
88
|
+
/******/
|
|
89
|
+
/******/ // Execute the module function
|
|
90
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
91
|
+
/******/
|
|
92
|
+
/******/ // Return the exports of the module
|
|
93
|
+
/******/ return module.exports;
|
|
94
|
+
/******/ }
|
|
95
|
+
/******/
|
|
96
|
+
/************************************************************************/
|
|
97
|
+
/******/ /* webpack/runtime/define property getters */
|
|
98
|
+
/******/ (() => {
|
|
99
|
+
/******/ // define getter functions for harmony exports
|
|
100
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
101
|
+
/******/ for(var key in definition) {
|
|
102
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
103
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
104
|
+
/******/ }
|
|
105
|
+
/******/ }
|
|
106
|
+
/******/ };
|
|
107
|
+
/******/ })();
|
|
108
|
+
/******/
|
|
109
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
110
|
+
/******/ (() => {
|
|
111
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
112
|
+
/******/ })();
|
|
113
|
+
/******/
|
|
114
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
115
|
+
/******/ (() => {
|
|
116
|
+
/******/ // define __esModule on exports
|
|
117
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
118
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
119
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
120
|
+
/******/ }
|
|
121
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
122
|
+
/******/ };
|
|
123
|
+
/******/ })();
|
|
124
|
+
/******/
|
|
125
|
+
/************************************************************************/
|
|
126
|
+
var __webpack_exports__ = {};
|
|
127
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
128
|
+
(() => {
|
|
129
|
+
/*!**********************!*\
|
|
130
|
+
!*** ./src/index.js ***!
|
|
131
|
+
\**********************/
|
|
132
|
+
__webpack_require__.r(__webpack_exports__);
|
|
133
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
134
|
+
/* harmony export */ IDV: () => (/* binding */ IDV)
|
|
135
|
+
/* harmony export */ });
|
|
136
|
+
/* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/bridge */ "./src/internal/bridge.js");
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class IDV {
|
|
140
|
+
static get instance() { return IDV._instance }
|
|
141
|
+
static _instance = new IDV()
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
})();
|
|
145
|
+
|
|
146
|
+
var __webpack_export_target__ = exports;
|
|
147
|
+
for(var __webpack_i__ in __webpack_exports__) __webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
148
|
+
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
|
149
|
+
/******/ })()
|
|
150
|
+
;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NativeModules, NativeEventEmitter } from 'react-native'
|
|
2
|
+
|
|
3
|
+
const { RNIDV } = NativeModules
|
|
4
|
+
var eventManager = new NativeEventEmitter(RNIDV)
|
|
5
|
+
|
|
6
|
+
export async function exec(name, params) {
|
|
7
|
+
return RNIDV.exec(name, params)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function _setEvent(id, completion, fromJson) {
|
|
11
|
+
eventManager.removeAllListeners(id)
|
|
12
|
+
if (completion == null) return
|
|
13
|
+
if (fromJson == null) eventManager.addListener(id, completion)
|
|
14
|
+
else eventManager.addListener(id, data => {
|
|
15
|
+
data = fromJson(data)
|
|
16
|
+
if (data !== null && typeof data[Symbol.iterator] === 'function') completion(...data)
|
|
17
|
+
else completion(data)
|
|
18
|
+
})
|
|
19
|
+
}
|