@regulaforensics/react-native-document-reader-api 5.8.1 → 6.1.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/README.md +1 -1
- package/RNDocumentReaderApi.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/regula/documentreader/Helpers.java +1 -3
- package/android/src/main/java/com/regula/documentreader/JSONConstructor.java +110 -10
- package/android/src/main/java/com/regula/documentreader/RNRegulaDocumentReaderModule.java +8 -12
- package/android/src/main/java/com/regula/documentreader/RegulaConfig.java +3 -0
- package/example/.editorconfig +3 -0
- package/example/.flowconfig +4 -13
- package/example/.gitattributes +3 -1
- package/example/.prettierrc.js +1 -0
- package/example/App.js +30 -18
- package/example/android/app/BUCK +55 -0
- package/example/android/app/build.gradle +35 -17
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/src/debug/AndroidManifest.xml +6 -1
- package/example/android/app/src/main/AndroidManifest.xml +21 -22
- package/example/android/app/src/main/assets/index.android.bundle +636 -0
- package/example/android/app/src/main/java/com/regula/dr/fullrfid/MainApplication.java +1 -2
- 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/android/build.gradle +12 -6
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +2 -1
- package/example/android/gradlew +14 -17
- package/example/android/gradlew.bat +7 -18
- package/example/android/settings.gradle +0 -2
- package/example/ios/DocumentReader/AppDelegate.m +7 -3
- package/example/ios/DocumentReader/Info.plist +8 -10
- package/example/ios/DocumentReader/LaunchScreen.storyboard +47 -0
- package/example/ios/DocumentReader.xcodeproj/project.pbxproj +257 -96
- package/example/ios/DocumentReader.xcodeproj/xcshareddata/xcschemes/DocumentReader.xcscheme +1 -1
- package/example/ios/DocumentReaderTests/DocumentReaderTests.m +65 -0
- package/example/ios/DocumentReaderTests/Info.plist +24 -0
- package/example/ios/Podfile +13 -4
- package/example/metro.config.js +1 -1
- package/example/package.json +17 -18
- package/index.d.ts +713 -514
- package/index.js +661 -510
- package/ios/RGLWJSONConstructor.h +6 -0
- package/ios/RGLWJSONConstructor.m +92 -0
- package/ios/RNRegulaDocumentReader.m +5 -5
- package/ios/RegulaConfig.m +3 -0
- package/package.json +1 -1
- package/example/ios/DocumentReader.xcodeproj/xcshareddata/xcschemes/DocumentReader-tvOS.xcscheme +0 -88
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#import <UIKit/UIKit.h>
|
|
2
|
+
#import <XCTest/XCTest.h>
|
|
3
|
+
|
|
4
|
+
#import <React/RCTLog.h>
|
|
5
|
+
#import <React/RCTRootView.h>
|
|
6
|
+
|
|
7
|
+
#define TIMEOUT_SECONDS 600
|
|
8
|
+
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
|
9
|
+
|
|
10
|
+
@interface DocumentReaderTests : XCTestCase
|
|
11
|
+
|
|
12
|
+
@end
|
|
13
|
+
|
|
14
|
+
@implementation DocumentReaderTests
|
|
15
|
+
|
|
16
|
+
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
|
17
|
+
{
|
|
18
|
+
if (test(view)) {
|
|
19
|
+
return YES;
|
|
20
|
+
}
|
|
21
|
+
for (UIView *subview in [view subviews]) {
|
|
22
|
+
if ([self findSubviewInView:subview matching:test]) {
|
|
23
|
+
return YES;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return NO;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
- (void)testRendersWelcomeScreen
|
|
30
|
+
{
|
|
31
|
+
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
|
|
32
|
+
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
|
33
|
+
BOOL foundElement = NO;
|
|
34
|
+
|
|
35
|
+
__block NSString *redboxError = nil;
|
|
36
|
+
#ifdef DEBUG
|
|
37
|
+
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
|
38
|
+
if (level >= RCTLogLevelError) {
|
|
39
|
+
redboxError = message;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
#endif
|
|
43
|
+
|
|
44
|
+
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
|
45
|
+
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
46
|
+
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
47
|
+
|
|
48
|
+
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
|
|
49
|
+
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
|
50
|
+
return YES;
|
|
51
|
+
}
|
|
52
|
+
return NO;
|
|
53
|
+
}];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#ifdef DEBUG
|
|
57
|
+
RCTSetLogFunction(RCTDefaultLogFunction);
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
|
|
61
|
+
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@end
|
|
@@ -0,0 +1,24 @@
|
|
|
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>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
7
|
+
<key>CFBundleExecutable</key>
|
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
+
<string>6.0</string>
|
|
13
|
+
<key>CFBundleName</key>
|
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
|
15
|
+
<key>CFBundlePackageType</key>
|
|
16
|
+
<string>BNDL</string>
|
|
17
|
+
<key>CFBundleShortVersionString</key>
|
|
18
|
+
<string>1.0</string>
|
|
19
|
+
<key>CFBundleSignature</key>
|
|
20
|
+
<string>????</string>
|
|
21
|
+
<key>CFBundleVersion</key>
|
|
22
|
+
<string>1</string>
|
|
23
|
+
</dict>
|
|
24
|
+
</plist>
|
package/example/ios/Podfile
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
|
2
2
|
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
|
3
3
|
|
|
4
|
-
platform :ios, '
|
|
4
|
+
platform :ios, '11.0'
|
|
5
5
|
|
|
6
6
|
target 'DocumentReader' do
|
|
7
7
|
config = use_native_modules!
|
|
8
8
|
|
|
9
|
-
use_react_native!(
|
|
9
|
+
use_react_native!(
|
|
10
|
+
:path => config[:reactNativePath],
|
|
11
|
+
:hermes_enabled => false
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
target 'DocumentReaderTests' do
|
|
15
|
+
inherit! :complete
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
use_flipper!()
|
|
10
19
|
|
|
11
|
-
use_flipper!({ 'Flipper' => '0.87.0', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1' })
|
|
12
20
|
post_install do |installer|
|
|
13
|
-
|
|
21
|
+
react_native_post_install(installer)
|
|
22
|
+
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
14
23
|
end
|
|
15
24
|
end
|
package/example/metro.config.js
CHANGED
package/example/package.json
CHANGED
|
@@ -7,29 +7,28 @@
|
|
|
7
7
|
"ios": "react-native run-ios",
|
|
8
8
|
"start": "react-native start",
|
|
9
9
|
"test": "jest",
|
|
10
|
-
"lint": "eslint ."
|
|
11
|
-
"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"
|
|
10
|
+
"lint": "eslint ."
|
|
12
11
|
},
|
|
13
12
|
"dependencies": {
|
|
14
|
-
"react": "
|
|
15
|
-
"react-native": "
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "^6.1.0",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullrfid": "^6.1.0",
|
|
15
|
+
"react": "17.0.2",
|
|
16
|
+
"react-native": "^0.67.0",
|
|
16
17
|
"react-native-check-box": "^2.1.7",
|
|
17
|
-
"react-native-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"react-native-
|
|
21
|
-
"react-native-fs": "^2.16.6",
|
|
22
|
-
"react-native-radio-buttons-group": "^1.0.7"
|
|
18
|
+
"react-native-fs": "^2.18.0",
|
|
19
|
+
"react-native-image-picker": "^4.1.2",
|
|
20
|
+
"react-native-progress": "5.0.0",
|
|
21
|
+
"react-native-radio-buttons-group": "^2.2.7"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"@babel/core": "
|
|
26
|
-
"@babel/runtime": "
|
|
27
|
-
"@react-native-community/eslint-config": "
|
|
28
|
-
"babel-jest": "
|
|
29
|
-
"eslint": "
|
|
30
|
-
"jest": "
|
|
31
|
-
"metro-react-native-babel-preset": "^0.
|
|
32
|
-
"react-test-renderer": "
|
|
24
|
+
"@babel/core": "7.16.0",
|
|
25
|
+
"@babel/runtime": "7.16.0",
|
|
26
|
+
"@react-native-community/eslint-config": "2.0.0",
|
|
27
|
+
"babel-jest": "26.6.3",
|
|
28
|
+
"eslint": "7.14.0",
|
|
29
|
+
"jest": "26.6.3",
|
|
30
|
+
"metro-react-native-babel-preset": "^0.66.2",
|
|
31
|
+
"react-test-renderer": "17.0.2"
|
|
33
32
|
},
|
|
34
33
|
"jest": {
|
|
35
34
|
"preset": "react-native"
|