@regulaforensics/react-native-document-reader-api 8.1.146-rc → 8.1.148-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.
- package/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +24 -7
- package/example/package.json +2 -2
- package/index.d.ts +6 -0
- package/index.js +6 -0
- package/ios/RGLWConfig.m +14 -5
- package/package.json +1 -1
|
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.source = { :http => 'file:' + __dir__ }
|
|
15
15
|
s.ios.deployment_target = '13.0'
|
|
16
16
|
s.source_files = "ios/*.{h,m}"
|
|
17
|
-
s.dependency 'DocumentReaderStage', '8.1.
|
|
17
|
+
s.dependency 'DocumentReaderStage', '8.1.4730'
|
|
18
18
|
s.dependency 'React'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -41,7 +41,7 @@ dependencies {
|
|
|
41
41
|
//noinspection GradleDynamicVersion
|
|
42
42
|
implementation 'com.facebook.react:react-native:+'
|
|
43
43
|
//noinspection GradleDependency
|
|
44
|
-
implementation('com.regula.documentreader:api:8.1.
|
|
44
|
+
implementation('com.regula.documentreader:api:8.1.11525') {
|
|
45
45
|
transitive = true
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -8,6 +8,7 @@ import android.graphics.Bitmap
|
|
|
8
8
|
import android.graphics.Matrix
|
|
9
9
|
import android.graphics.Rect
|
|
10
10
|
import android.graphics.Typeface
|
|
11
|
+
import android.os.Build
|
|
11
12
|
import android.util.Pair
|
|
12
13
|
import com.regula.common.exception.RegulaException
|
|
13
14
|
import com.regula.documentreader.api.License
|
|
@@ -500,13 +501,29 @@ fun generateGlaresCheckParams(input: GlaresCheckParams?) = input?.let {
|
|
|
500
501
|
).toJson()
|
|
501
502
|
}
|
|
502
503
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
)
|
|
504
|
+
@SuppressLint("DiscouragedApi")
|
|
505
|
+
fun typefaceFromJSON(it: JSONObject): Pair<Typeface?, Int?> {
|
|
506
|
+
val font = try {
|
|
507
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
|
508
|
+
context.resources.getFont(
|
|
509
|
+
context.resources.getIdentifier(
|
|
510
|
+
it.getString("name"),
|
|
511
|
+
"font",
|
|
512
|
+
context.packageName
|
|
513
|
+
)
|
|
514
|
+
)
|
|
515
|
+
else throw Exception("")
|
|
516
|
+
} catch (_: Exception) {
|
|
517
|
+
Typeface.create(
|
|
518
|
+
it.getString("name"),
|
|
519
|
+
it.optInt("style", Typeface.NORMAL)
|
|
520
|
+
)
|
|
521
|
+
}
|
|
522
|
+
return Pair(
|
|
523
|
+
font,
|
|
524
|
+
if (it.has("size")) it.getInt("size") else null
|
|
525
|
+
)
|
|
526
|
+
}
|
|
510
527
|
|
|
511
528
|
fun generateTypeface(input: Typeface?, size: Int? = null) = input?.let {
|
|
512
529
|
mapOf(
|
package/example/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"test": "jest"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@regulaforensics/react-native-document-reader-api": "8.1.
|
|
14
|
-
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.1.
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "8.1.148-rc",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.1.363-rc",
|
|
15
15
|
"react-native-progress": "5.0.0",
|
|
16
16
|
"react-native-radio-buttons-group": "3.0.5",
|
|
17
17
|
"@rneui/base": "4.0.0-rc.7",
|
package/index.d.ts
CHANGED
|
@@ -3266,6 +3266,11 @@ export const eProcessGLCommands = {
|
|
|
3266
3266
|
ePC_RFID_SetTCCParams: 12522,
|
|
3267
3267
|
}
|
|
3268
3268
|
|
|
3269
|
+
export const eRFIDReadingBufferSize = {
|
|
3270
|
+
EXTENDED_LENGTH: 0,
|
|
3271
|
+
SINGLE_LENGTH: -1,
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3269
3274
|
export const PKDResourceType = {
|
|
3270
3275
|
CERTIFICATE_PA: 0,
|
|
3271
3276
|
CERTIFICATE_TA: 1,
|
|
@@ -5352,6 +5357,7 @@ export const Enum = {
|
|
|
5352
5357
|
eRPRM_FieldVerificationResult,
|
|
5353
5358
|
DocReaderAction,
|
|
5354
5359
|
eProcessGLCommands,
|
|
5360
|
+
eRFIDReadingBufferSize,
|
|
5355
5361
|
PKDResourceType,
|
|
5356
5362
|
eRFID_AuthenticationProcedureType,
|
|
5357
5363
|
DocumentReaderErrorCodes,
|
package/index.js
CHANGED
|
@@ -2275,6 +2275,11 @@ export const eProcessGLCommands = {
|
|
|
2275
2275
|
ePC_RFID_SetTCCParams: 12522,
|
|
2276
2276
|
}
|
|
2277
2277
|
|
|
2278
|
+
export const eRFIDReadingBufferSize = {
|
|
2279
|
+
EXTENDED_LENGTH: 0,
|
|
2280
|
+
SINGLE_LENGTH: -1,
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2278
2283
|
export const PKDResourceType = {
|
|
2279
2284
|
CERTIFICATE_PA: 0,
|
|
2280
2285
|
CERTIFICATE_TA: 1,
|
|
@@ -4361,6 +4366,7 @@ export const Enum = {
|
|
|
4361
4366
|
eRPRM_FieldVerificationResult,
|
|
4362
4367
|
DocReaderAction,
|
|
4363
4368
|
eProcessGLCommands,
|
|
4369
|
+
eRFIDReadingBufferSize,
|
|
4364
4370
|
PKDResourceType,
|
|
4365
4371
|
eRFID_AuthenticationProcedureType,
|
|
4366
4372
|
DocumentReaderErrorCodes,
|
package/ios/RGLWConfig.m
CHANGED
|
@@ -398,6 +398,7 @@
|
|
|
398
398
|
customization.status = [options valueForKey:@"status"];
|
|
399
399
|
if([options valueForKey:@"resultStatus"] != nil)
|
|
400
400
|
customization.resultStatus = [options valueForKey:@"resultStatus"];
|
|
401
|
+
if(options[@"multipageButtonText"]) customization.multipageButtonText = options[@"multipageButtonText"];
|
|
401
402
|
|
|
402
403
|
// Color
|
|
403
404
|
if([options valueForKey:@"cameraFrameDefaultColor"] != nil)
|
|
@@ -422,6 +423,7 @@
|
|
|
422
423
|
customization.cameraPreviewBackgroundColor = [self colorWithInt:[options valueForKey:@"cameraPreviewBackgroundColor"]];
|
|
423
424
|
if([options valueForKey:@"backgroundMaskColor"] != nil)
|
|
424
425
|
customization.backgroundMaskColor = [self colorWithInt:[options valueForKey:@"backgroundMaskColor"]];
|
|
426
|
+
if(options[@"multipageButtonTextColor"]) customization.multipageButtonTextColor = [self colorWithInt:options[@"multipageButtonTextColor"]];
|
|
425
427
|
|
|
426
428
|
// Float
|
|
427
429
|
if([options valueForKey:@"statusPositionMultiplier"] != nil)
|
|
@@ -444,9 +446,9 @@
|
|
|
444
446
|
customization.cameraFrameCornerRadius = [[options valueForKey:@"cameraFrameCornerRadius"] floatValue];
|
|
445
447
|
if([options valueForKey:@"livenessAnimationPositionMultiplier"] != nil)
|
|
446
448
|
customization.livenessAnimationPositionMultiplier = [[options valueForKey:@"livenessAnimationPositionMultiplier"] floatValue];
|
|
447
|
-
if(options[@"activityIndicatorPortraitPositionMultiplier"]) customization.activityIndicatorPortraitPositionMultiplier = [[
|
|
448
|
-
if(options[@"activityIndicatorLandscapePositionMultiplier"]) customization.activityIndicatorLandscapePositionMultiplier = [[
|
|
449
|
-
if(options[@"cameraPreviewVerticalPositionMultiplier"]) customization.previewLayerPositionMultiplier = [[
|
|
449
|
+
if(options[@"activityIndicatorPortraitPositionMultiplier"]) customization.activityIndicatorPortraitPositionMultiplier = [options[@"activityIndicatorPortraitPositionMultiplier"] floatValue];
|
|
450
|
+
if(options[@"activityIndicatorLandscapePositionMultiplier"]) customization.activityIndicatorLandscapePositionMultiplier = [options[@"activityIndicatorLandscapePositionMultiplier"] floatValue];
|
|
451
|
+
if(options[@"cameraPreviewVerticalPositionMultiplier"]) customization.previewLayerPositionMultiplier = [options[@"cameraPreviewVerticalPositionMultiplier"] floatValue];
|
|
450
452
|
|
|
451
453
|
// Drawable
|
|
452
454
|
if([options valueForKey:@"multipageAnimationFrontImage"] != nil)
|
|
@@ -479,6 +481,7 @@
|
|
|
479
481
|
customization.statusTextFont = [self UIFontFromJSON:[options valueForKey:@"statusTextFont"]];
|
|
480
482
|
if([options valueForKey:@"resultStatusTextFont"] != nil)
|
|
481
483
|
customization.resultStatusTextFont = [self UIFontFromJSON:[options valueForKey:@"resultStatusTextFont"]];
|
|
484
|
+
if(options[@"multipageButtonTextFont"]) customization.multipageButtonTextFont = [self UIFontFromJSON:options[@"multipageButtonTextFont"]];
|
|
482
485
|
|
|
483
486
|
// Custom
|
|
484
487
|
if([options valueForKey:@"customLabelStatus"] != nil)
|
|
@@ -529,6 +532,7 @@
|
|
|
529
532
|
// String
|
|
530
533
|
result[@"status"] = customization.status;
|
|
531
534
|
result[@"resultStatus"] = customization.resultStatus;
|
|
535
|
+
result[@"multipageButtonText"] = customization.multipageButtonText;
|
|
532
536
|
|
|
533
537
|
// Color
|
|
534
538
|
result[@"cameraFrameDefaultColor"] = [self intWithColor:customization.cameraFrameDefaultColor];
|
|
@@ -542,6 +546,7 @@
|
|
|
542
546
|
result[@"statusBackgroundColor"] = [self intWithColor:customization.statusBackgroundColor];
|
|
543
547
|
result[@"cameraPreviewBackgroundColor"] = [self intWithColor:customization.cameraPreviewBackgroundColor];
|
|
544
548
|
result[@"backgroundMaskColor"] = [self intWithColor:customization.backgroundMaskColor];
|
|
549
|
+
result[@"multipageButtonTextColor"] = [self intWithColor:customization.multipageButtonTextColor];
|
|
545
550
|
|
|
546
551
|
// Float
|
|
547
552
|
result[@"statusPositionMultiplier"] = [NSNumber numberWithFloat:customization.statusPositionMultiplier];
|
|
@@ -575,6 +580,7 @@
|
|
|
575
580
|
// Font
|
|
576
581
|
result[@"statusTextFont"] = [self generateUIFont:customization.statusTextFont];
|
|
577
582
|
result[@"resultStatusTextFont"] = [self generateUIFont:customization.resultStatusTextFont];
|
|
583
|
+
result[@"multipageButtonTextFont"] = [self generateUIFont:customization.multipageButtonTextFont];
|
|
578
584
|
|
|
579
585
|
// Custom
|
|
580
586
|
if(customization.customLabelStatus != nil) result[@"customLabelStatus"] = customization.customLabelStatus.string;
|
|
@@ -674,7 +680,7 @@
|
|
|
674
680
|
if([options valueForKey:@"signManagementAction"] != nil)
|
|
675
681
|
rfidScenario.signManagementAction = [[options valueForKey:@"signManagementAction"] integerValue];
|
|
676
682
|
if([options valueForKey:@"readingBuffer"] != nil)
|
|
677
|
-
rfidScenario.readingBuffer = [[options valueForKey:@"readingBuffer"]
|
|
683
|
+
rfidScenario.readingBuffer = [[options valueForKey:@"readingBuffer"] integerValue];
|
|
678
684
|
if([options valueForKey:@"onlineTAToSignDataType"] != nil)
|
|
679
685
|
rfidScenario.onlineTAToSignDataType = [[options valueForKey:@"onlineTAToSignDataType"] intValue];
|
|
680
686
|
if([options valueForKey:@"profilerType"] != nil)
|
|
@@ -1193,10 +1199,13 @@
|
|
|
1193
1199
|
}
|
|
1194
1200
|
|
|
1195
1201
|
+(UIFont*)UIFontFromJSON:(NSDictionary*)input {
|
|
1196
|
-
|
|
1202
|
+
UIFont* result = [UIFont fontWithName:[input valueForKey:@"name"] size:[[input valueForKey:@"size"] integerValue]];
|
|
1203
|
+
if (!result || !result.fontName) return nil;
|
|
1204
|
+
return result;
|
|
1197
1205
|
}
|
|
1198
1206
|
|
|
1199
1207
|
+(NSDictionary*)generateUIFont:(UIFont*)input {
|
|
1208
|
+
if (!input || !input.fontName) return nil;
|
|
1200
1209
|
return @{
|
|
1201
1210
|
@"name": input.fontName,
|
|
1202
1211
|
@"size": @(input.pointSize)
|
package/package.json
CHANGED