@regulaforensics/react-native-document-reader-api 6.8.0 → 6.9.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.
- package/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +18 -1
- package/android/src/main/java/com/regula/documentreader/BluetoothUtil.kt +6 -6
- package/android/src/main/java/com/regula/documentreader/Helpers.java +117 -3
- package/android/src/main/java/com/regula/documentreader/JSONConstructor.java +182 -261
- package/android/src/main/java/com/regula/documentreader/RNRegulaDocumentReaderModule.java +142 -125
- package/android/src/main/java/com/regula/documentreader/RegulaConfig.java +114 -26
- package/example/.bundle/config +2 -0
- package/example/.eslintrc.js +1 -1
- package/example/.prettierrc.js +2 -2
- package/example/.watchmanconfig +1 -1
- package/example/App.tsx +358 -0
- package/example/Gemfile +6 -0
- package/example/Gemfile.lock +98 -0
- package/example/__tests__/{App-test.js → App.test.tsx} +3 -0
- package/example/android/app/build.gradle +77 -59
- package/example/android/app/src/debug/AndroidManifest.xml +1 -1
- package/example/android/app/src/debug/java/com/regula/dr/fullrfid/ReactNativeFlipper.java +7 -4
- package/example/android/app/src/main/AndroidManifest.xml +4 -9
- package/example/android/app/src/main/java/com/regula/dr/fullrfid/MainActivity.java +17 -0
- package/example/android/app/src/main/java/com/regula/dr/fullrfid/MainApplication.java +17 -36
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/example/android/app/src/main/res/values/styles.xml +2 -2
- package/example/android/app/src/release/java/com/regula/dr/fullrfid/ReactNativeFlipper.java +20 -0
- package/example/android/build.gradle +7 -18
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/example/android/gradle.properties +42 -2
- package/example/android/gradlew +164 -105
- package/example/android/gradlew.bat +92 -89
- package/example/android/settings.gradle +2 -1
- package/example/app.json +1 -1
- package/example/ios/.xcode.env +11 -0
- package/example/ios/DocumentReader/AppDelegate.h +2 -4
- package/example/ios/DocumentReader/AppDelegate.mm +26 -0
- package/example/ios/DocumentReader/DocumentReader.entitlements +0 -1
- package/example/ios/DocumentReader/Images.xcassets/AppIcon.appiconset/Contents.json +30 -15
- package/example/ios/DocumentReader/Info.plist +8 -4
- package/example/ios/DocumentReader/main.m +2 -1
- package/example/ios/DocumentReader.xcodeproj/project.pbxproj +134 -96
- package/example/ios/DocumentReaderTests/DocumentReaderTests.m +14 -13
- package/example/ios/Podfile +45 -15
- package/example/jest.config.js +3 -0
- package/example/metro.config.js +18 -15
- package/example/package-lock.json +13091 -0
- package/example/package.json +32 -22
- package/example/tsconfig.json +3 -0
- package/index.d.ts +426 -3015
- package/index.js +253 -2954
- package/ios/RGLWJSONConstructor.h +8 -6
- package/ios/RGLWJSONConstructor.m +109 -92
- package/ios/RGLWRegulaConfig.h +2 -1
- package/ios/RGLWRegulaConfig.m +139 -41
- package/ios/RNRegulaDocumentReader.m +55 -42
- package/package.json +1 -1
- package/example/.buckconfig +0 -6
- package/example/.editorconfig +0 -3
- package/example/.flowconfig +0 -65
- package/example/.gitattributes +0 -3
- package/example/App.js +0 -399
- package/example/android/app/BUCK +0 -55
- package/example/android/app/_BUCK +0 -55
- package/example/android/app/build_defs.bzl +0 -19
- package/example/android/app/src/main/assets/index.android.bundle +0 -636
- package/example/android/app/src/main/res/drawable-mdpi/images_id.png +0 -0
- package/example/android/app/src/main/res/drawable-mdpi/images_portrait.png +0 -0
- package/example/android/app/src/main/res/drawable-mdpi/node_modules_reactnativecheckbox_img_ic_check_box.png +0 -0
- package/example/android/app/src/main/res/drawable-mdpi/node_modules_reactnativecheckbox_img_ic_check_box_outline_blank.png +0 -0
- package/example/android/app/src/main/res/drawable-mdpi/node_modules_reactnativecheckbox_img_ic_indeterminate_check_box.png +0 -0
- package/example/android/app/src/main/res/drawable-xhdpi/node_modules_reactnativecheckbox_img_ic_check_box.png +0 -0
- package/example/android/app/src/main/res/drawable-xhdpi/node_modules_reactnativecheckbox_img_ic_check_box_outline_blank.png +0 -0
- package/example/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnativecheckbox_img_ic_check_box.png +0 -0
- package/example/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnativecheckbox_img_ic_check_box_outline_blank.png +0 -0
- package/example/ios/DocumentReader/AppDelegate.m +0 -62
- package/example/ios/DocumentReader/Base.lproj/LaunchScreen.xib +0 -42
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
@implementation DocumentReaderTests
|
|
15
15
|
|
|
16
|
-
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
|
16
|
+
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
|
|
17
17
|
{
|
|
18
18
|
if (test(view)) {
|
|
19
19
|
return YES;
|
|
@@ -34,23 +34,25 @@
|
|
|
34
34
|
|
|
35
35
|
__block NSString *redboxError = nil;
|
|
36
36
|
#ifdef DEBUG
|
|
37
|
-
RCTSetLogFunction(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
RCTSetLogFunction(
|
|
38
|
+
^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
|
39
|
+
if (level >= RCTLogLevelError) {
|
|
40
|
+
redboxError = message;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
42
43
|
#endif
|
|
43
44
|
|
|
44
45
|
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
|
45
46
|
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
46
47
|
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
47
48
|
|
|
48
|
-
foundElement = [self findSubviewInView:vc.view
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
foundElement = [self findSubviewInView:vc.view
|
|
50
|
+
matching:^BOOL(UIView *view) {
|
|
51
|
+
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
|
52
|
+
return YES;
|
|
53
|
+
}
|
|
54
|
+
return NO;
|
|
55
|
+
}];
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
#ifdef DEBUG
|
|
@@ -61,5 +63,4 @@
|
|
|
61
63
|
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
|
|
65
66
|
@end
|
package/example/ios/Podfile
CHANGED
|
@@ -1,32 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Resolve react_native_pods.rb with node to allow for hoisting
|
|
2
|
+
require Pod::Executable.execute_command('node', ['-p',
|
|
3
|
+
'require.resolve(
|
|
4
|
+
"react-native/scripts/react_native_pods.rb",
|
|
5
|
+
{paths: [process.argv[1]]},
|
|
6
|
+
)', __dir__]).strip
|
|
3
7
|
|
|
4
|
-
platform :ios,
|
|
8
|
+
platform :ios, min_ios_version_supported
|
|
9
|
+
prepare_react_native_project!
|
|
10
|
+
|
|
11
|
+
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
|
|
12
|
+
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
|
|
13
|
+
#
|
|
14
|
+
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
|
|
15
|
+
# ```js
|
|
16
|
+
# module.exports = {
|
|
17
|
+
# dependencies: {
|
|
18
|
+
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
|
|
19
|
+
# ```
|
|
20
|
+
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
|
|
21
|
+
|
|
22
|
+
linkage = ENV['USE_FRAMEWORKS']
|
|
23
|
+
if linkage != nil
|
|
24
|
+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
|
|
25
|
+
use_frameworks! :linkage => linkage.to_sym
|
|
26
|
+
end
|
|
5
27
|
|
|
6
28
|
target 'DocumentReader' do
|
|
7
29
|
config = use_native_modules!
|
|
8
30
|
|
|
31
|
+
# Flags change depending on the env values.
|
|
32
|
+
flags = get_default_flags()
|
|
33
|
+
|
|
9
34
|
use_react_native!(
|
|
10
35
|
:path => config[:reactNativePath],
|
|
11
|
-
|
|
36
|
+
# Hermes is now enabled by default. Disable by setting this flag to false.
|
|
37
|
+
:hermes_enabled => flags[:hermes_enabled],
|
|
38
|
+
:fabric_enabled => flags[:fabric_enabled],
|
|
39
|
+
# Enables Flipper.
|
|
40
|
+
#
|
|
41
|
+
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
|
42
|
+
# you should disable the next line.
|
|
43
|
+
:flipper_configuration => flipper_config,
|
|
44
|
+
# An absolute path to your application root.
|
|
45
|
+
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
12
46
|
)
|
|
13
47
|
|
|
14
48
|
target 'DocumentReaderTests' do
|
|
15
49
|
inherit! :complete
|
|
50
|
+
# Pods for testing
|
|
16
51
|
end
|
|
17
52
|
|
|
18
|
-
use_flipper!()
|
|
19
|
-
|
|
20
53
|
post_install do |installer|
|
|
21
|
-
|
|
54
|
+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
|
55
|
+
react_native_post_install(
|
|
56
|
+
installer,
|
|
57
|
+
config[:reactNativePath],
|
|
58
|
+
:mac_catalyst_enabled => false
|
|
59
|
+
)
|
|
22
60
|
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
23
|
-
|
|
24
|
-
installer.pods_project.targets.each do |target|
|
|
25
|
-
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
|
|
26
|
-
target.build_configurations.each do |config|
|
|
27
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
61
|
end
|
|
32
62
|
end
|
package/example/metro.config.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
|
|
2
|
+
|
|
1
3
|
const path = require('path');
|
|
2
4
|
const folders = [
|
|
3
|
-
|
|
5
|
+
path.resolve(path.join(__dirname, './node_modules'))
|
|
4
6
|
];
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Metro configuration
|
|
10
|
+
* https://facebook.github.io/metro/docs/configuration
|
|
11
|
+
*
|
|
12
|
+
* @type {import('metro-config').MetroConfig}
|
|
13
|
+
*/
|
|
14
|
+
const config = {
|
|
15
|
+
resolver: {
|
|
16
|
+
nodeModulesPaths: folders
|
|
17
|
+
},
|
|
18
|
+
watchFolders: folders,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
|