@regulaforensics/document-reader 9.2.624-rc → 9.2.631-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 (38) hide show
  1. package/RNDocumentReader.podspec +2 -2
  2. package/android/build.gradle +1 -1
  3. package/android/cordova.gradle +1 -1
  4. package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +38 -9
  5. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +13 -0
  6. package/examples/capacitor/package-lock.json +3 -3
  7. package/examples/capacitor/package.json +1 -1
  8. package/examples/ionic/package-lock.json +180 -170
  9. package/examples/ionic/package.json +1 -1
  10. package/examples/react_native/package-lock.json +6 -6
  11. package/examples/react_native/package.json +1 -1
  12. package/ios/RGLWConfig.m +30 -18
  13. package/ios/RGLWJSONConstructor.h +2 -0
  14. package/ios/RGLWJSONConstructor.m +18 -0
  15. package/package.json +1 -1
  16. package/plugin.xml +2 -2
  17. package/test/json.tsx +22 -3
  18. package/test/package-lock.json +1 -1
  19. package/test/test.tsx +3 -2
  20. package/www/capacitor/index.js +3 -2
  21. package/www/capacitor/params/customization/CustomizationColors.js +80 -0
  22. package/www/capacitor/params/customization/CustomizationFonts.js +50 -2
  23. package/www/capacitor/params/customization/CustomizationImages.js +18 -2
  24. package/www/capacitor/params/process_params/Bsi.js +23 -0
  25. package/www/capacitor/params/process_params/ProcessParams.js +9 -17
  26. package/www/cordova.js +293 -118
  27. package/www/react-native/index.js +3 -2
  28. package/www/react-native/params/customization/CustomizationColors.js +80 -0
  29. package/www/react-native/params/customization/CustomizationFonts.js +50 -2
  30. package/www/react-native/params/customization/CustomizationImages.js +18 -2
  31. package/www/react-native/params/process_params/Bsi.js +23 -0
  32. package/www/react-native/params/process_params/ProcessParams.js +9 -17
  33. package/www/types/index.d.ts +3 -2
  34. package/www/types/params/customization/CustomizationColors.d.ts +14 -0
  35. package/www/types/params/customization/CustomizationFonts.d.ts +9 -0
  36. package/www/types/params/customization/CustomizationImages.d.ts +5 -7
  37. package/www/types/params/process_params/Bsi.d.ts +3 -0
  38. package/www/types/params/process_params/ProcessParams.d.ts +2 -6
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = 'RNDocumentReader'
8
- s.version = '9.2.624-rc'
8
+ s.version = '9.2.631-rc'
9
9
  s.summary = package['description']
10
10
  s.license = package['license']
11
11
 
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
16
16
  s.ios.deployment_target = '13.0'
17
17
  s.source_files = 'ios/**/*.{h,m}'
18
18
  s.exclude_files = [ 'ios/CVDDocumentReader.h', 'ios/CVDDocumentReader.m' ]
19
- s.dependency 'DocumentReaderStage', '9.2.5970'
19
+ s.dependency 'DocumentReaderStage', '9.3.5986'
20
20
  s.dependency 'React'
21
21
  end
@@ -29,7 +29,7 @@ dependencies {
29
29
  //noinspection GradleDynamicVersion
30
30
  implementation 'com.facebook.react:react-native:+'
31
31
  //noinspection GradleDependency
32
- implementation('com.regula.documentreader:api:9.2.12489'){
32
+ implementation('com.regula.documentreader:api:9.2.12512'){
33
33
  transitive = true
34
34
  }
35
35
  }
@@ -6,7 +6,7 @@ repositories {
6
6
 
7
7
  dependencies {
8
8
  //noinspection GradleDependency
9
- implementation('com.regula.documentreader:api:9.2.12489'){
9
+ implementation('com.regula.documentreader:api:9.2.12512'){
10
10
  transitive = true
11
11
  }
12
12
  }
@@ -18,7 +18,6 @@ import com.regula.documentreader.api.params.ImageQA
18
18
  import com.regula.documentreader.api.params.LivenessParams
19
19
  import com.regula.documentreader.api.params.ParamsCustomization
20
20
  import com.regula.documentreader.api.params.ProcessParam
21
- import com.regula.documentreader.api.params.Bsi
22
21
  import com.regula.documentreader.api.params.RfidScenario
23
22
  import com.regula.documentreader.api.params.rfid.dg.DTCDataGroup
24
23
  import com.regula.documentreader.api.params.rfid.dg.DataGroups
@@ -148,11 +147,6 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
148
147
  "strictSecurityChecks" -> processParams.strictSecurityChecks = v as Boolean
149
148
  "returnTransliteratedFields" -> processParams.returnTransliteratedFields = v as Boolean
150
149
  "checkCaptureProcessIntegrity" -> processParams.checkCaptureProcessIntegrity = v as Boolean
151
- "bsiTr03135" -> {
152
- val temp = Bsi()
153
- temp.generateResult = (v as JSONObject).getBooleanOrNull("generateResult")
154
- processParams.bsiTr03135 = temp
155
- }
156
150
  "measureSystem" -> processParams.measureSystem = v.toInt()
157
151
  "barcodeParserType" -> processParams.barcodeParserType = v.toInt()
158
152
  "perspectiveAngle" -> processParams.perspectiveAngle = v.toInt()
@@ -191,6 +185,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
191
185
  "rfidParams" -> processParams.rfidParams = rfidParamsFromJSON(v as JSONObject)
192
186
  "faceApiParams" -> processParams.faceApiParams = faceApiParamsFromJSON(v as JSONObject)
193
187
  "backendProcessingConfig" -> processParams.backendProcessingConfig = backendProcessingConfigFromJSON(v as JSONObject)
188
+ "bsiTr03135" -> processParams.bsiTr03135 = bsiFromJSON(v as JSONObject)
194
189
  "authenticityParams" -> {
195
190
  if (processParams.authenticityParams == null) processParams.authenticityParams = AuthenticityParams.defaultParams()
196
191
  setAuthenticityParams(processParams.authenticityParams!!, v as JSONObject)
@@ -242,9 +237,6 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
242
237
  "strictSecurityChecks" to processParams.strictSecurityChecks,
243
238
  "returnTransliteratedFields" to processParams.returnTransliteratedFields,
244
239
  "checkCaptureProcessIntegrity" to processParams.checkCaptureProcessIntegrity,
245
- "bsiTr03135" to mapOf(
246
- "generateResult" to processParams.bsiTr03135?.generateResult
247
- ).toJson(),
248
240
  "measureSystem" to processParams.measureSystem,
249
241
  "barcodeParserType" to processParams.barcodeParserType,
250
242
  "perspectiveAngle" to processParams.perspectiveAngle,
@@ -282,6 +274,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
282
274
  "rfidParams" to generateRFIDParams(processParams.rfidParams),
283
275
  "faceApiParams" to generateFaceApiParams(processParams.faceApiParams),
284
276
  "backendProcessingConfig" to generateBackendProcessingConfig(processParams.backendProcessingConfig),
277
+ "bsiTr03135" to generateBsi(processParams.bsiTr03135),
285
278
  "authenticityParams" to getAuthenticityParams(processParams.authenticityParams),
286
279
  "customParams" to processParams.customParams,
287
280
  ).toJson()
@@ -777,6 +770,16 @@ fun setColors(input: ParamsCustomization.CustomizationEditor, opts: JSONObject)
777
770
  "rfidEnableNfcDescriptionText" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_DESCRIPTION_TEXT, value)
778
771
  "rfidEnableNfcButtonText" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_BUTTON_TEXT, value)
779
772
  "rfidEnableNfcButtonBackground" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_BUTTON_BACKGROUND, value)
773
+ "mdlProcessingScreenBackground" -> input.setColor(CustomizationColor.MDL_PROCESSING_SCREEN_BACKGROUND, value)
774
+ "mdlProcessingScreenHintLabelText" -> input.setColor(CustomizationColor.MDL_PROCESSING_SCREEN_HINT_LABEL_TEXT, value)
775
+ "mdlProcessingScreenHintLabelBackground" -> input.setColor(CustomizationColor.MDL_PROCESSING_SCREEN_HINT_LABEL_BACKGROUND, value)
776
+ "mdlProcessingScreenProgressLabelText" -> input.setColor(CustomizationColor.MDL_PROCESSING_SCREEN_PROGRESS_LABEL_TEXT, value)
777
+ "mdlProcessingScreenResultLabelText" -> input.setColor(CustomizationColor.MDL_PROCESSING_SCREEN_RESULT_LABEL_TEXT, value)
778
+ "mdlProcessingScreenLoadingBar" -> input.setColor(CustomizationColor.MDL_PROCESSING_SCREEN_LOADING_BAR, value)
779
+ "mdlEnableNfcTitleText" -> input.setColor(CustomizationColor.MDL_ENABLE_NFC_TITLE_TEXT, value)
780
+ "mdlEnableNfcDescriptionText" -> input.setColor(CustomizationColor.MDL_ENABLE_NFC_DESCRIPTION_TEXT, value)
781
+ "mdlEnableNfcButtonText" -> input.setColor(CustomizationColor.MDL_ENABLE_NFC_BUTTON_TEXT, value)
782
+ "mdlEnableNfcButtonBackground" -> input.setColor(CustomizationColor.MDL_ENABLE_NFC_BUTTON_BACKGROUND, value)
780
783
  }
781
784
  }
782
785
 
@@ -793,6 +796,16 @@ fun getColors(input: Map<CustomizationColor, Long>) = mapOf(
793
796
  "rfidEnableNfcDescriptionText" to input[CustomizationColor.RFID_ENABLE_NFC_DESCRIPTION_TEXT],
794
797
  "rfidEnableNfcButtonText" to input[CustomizationColor.RFID_ENABLE_NFC_BUTTON_TEXT],
795
798
  "rfidEnableNfcButtonBackground" to input[CustomizationColor.RFID_ENABLE_NFC_BUTTON_BACKGROUND],
799
+ "mdlProcessingScreenBackground" to input[CustomizationColor.MDL_PROCESSING_SCREEN_BACKGROUND],
800
+ "mdlProcessingScreenHintLabelText" to input[CustomizationColor.MDL_PROCESSING_SCREEN_HINT_LABEL_TEXT],
801
+ "mdlProcessingScreenHintLabelBackground" to input[CustomizationColor.MDL_PROCESSING_SCREEN_HINT_LABEL_BACKGROUND],
802
+ "mdlProcessingScreenProgressLabelText" to input[CustomizationColor.MDL_PROCESSING_SCREEN_PROGRESS_LABEL_TEXT],
803
+ "mdlProcessingScreenResultLabelText" to input[CustomizationColor.MDL_PROCESSING_SCREEN_RESULT_LABEL_TEXT],
804
+ "mdlProcessingScreenLoadingBar" to input[CustomizationColor.MDL_PROCESSING_SCREEN_LOADING_BAR],
805
+ "mdlEnableNfcTitleText" to input[CustomizationColor.MDL_ENABLE_NFC_TITLE_TEXT],
806
+ "mdlEnableNfcDescriptionText" to input[CustomizationColor.MDL_ENABLE_NFC_DESCRIPTION_TEXT],
807
+ "mdlEnableNfcButtonText" to input[CustomizationColor.MDL_ENABLE_NFC_BUTTON_TEXT],
808
+ "mdlEnableNfcButtonBackground" to input[CustomizationColor.MDL_ENABLE_NFC_BUTTON_BACKGROUND],
796
809
  ).toJson()
797
810
 
798
811
  fun setFonts(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) = opts.forEach { key, value ->
@@ -803,6 +816,12 @@ fun setFonts(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) =
803
816
  "rfidEnableNfcTitleText" -> CustomizationFont.RFID_ENABLE_NFC_TITLE_TEXT.setFont(input, value)
804
817
  "rfidEnableNfcDescriptionText" -> CustomizationFont.RFID_ENABLE_NFC_DESCRIPTION_TEXT.setFont(input, value)
805
818
  "rfidEnableNfcButtonText" -> CustomizationFont.RFID_ENABLE_NFC_BUTTON_TEXT.setFont(input, value)
819
+ "mdlProcessingScreenHintLabel" -> CustomizationFont.MDL_PROCESSING_SCREEN_HINT_LABEL.setFont(input, value)
820
+ "mdlProcessingScreenProgressLabel" -> CustomizationFont.MDL_PROCESSING_SCREEN_PROGRESS_LABEL.setFont(input, value)
821
+ "mdlProcessingScreenResultLabel" -> CustomizationFont.MDL_PROCESSING_SCREEN_RESULT_LABEL.setFont(input, value)
822
+ "mdlEnableNfcTitleText" -> CustomizationFont.MDL_ENABLE_NFC_TITLE_TEXT.setFont(input, value)
823
+ "mdlEnableNfcDescriptionText" -> CustomizationFont.MDL_ENABLE_NFC_DESCRIPTION_TEXT.setFont(input, value)
824
+ "mdlEnableNfcButtonText" -> CustomizationFont.MDL_ENABLE_NFC_BUTTON_TEXT.setFont(input, value)
806
825
  }
807
826
  }
808
827
 
@@ -813,18 +832,28 @@ fun getFonts(fonts: Map<CustomizationFont, Typeface>, sizes: Map<CustomizationFo
813
832
  "rfidEnableNfcTitleText" to CustomizationFont.RFID_ENABLE_NFC_TITLE_TEXT.getFont(fonts, sizes),
814
833
  "rfidEnableNfcDescriptionText" to CustomizationFont.RFID_ENABLE_NFC_DESCRIPTION_TEXT.getFont(fonts, sizes),
815
834
  "rfidEnableNfcButtonText" to CustomizationFont.RFID_ENABLE_NFC_BUTTON_TEXT.getFont(fonts, sizes),
835
+ "mdlProcessingScreenHintLabel" to CustomizationFont.MDL_PROCESSING_SCREEN_HINT_LABEL.getFont(fonts, sizes),
836
+ "mdlProcessingScreenProgressLabel" to CustomizationFont.MDL_PROCESSING_SCREEN_PROGRESS_LABEL.getFont(fonts, sizes),
837
+ "mdlProcessingScreenResultLabel" to CustomizationFont.MDL_PROCESSING_SCREEN_RESULT_LABEL.getFont(fonts, sizes),
838
+ "mdlEnableNfcTitleText" to CustomizationFont.MDL_ENABLE_NFC_TITLE_TEXT.getFont(fonts, sizes),
839
+ "mdlEnableNfcDescriptionText" to CustomizationFont.MDL_ENABLE_NFC_DESCRIPTION_TEXT.getFont(fonts, sizes),
840
+ "mdlEnableNfcButtonText" to CustomizationFont.MDL_ENABLE_NFC_BUTTON_TEXT.getFont(fonts, sizes),
816
841
  ).toJson()
817
842
 
818
843
  fun setImages(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) = opts.forEach { key, v ->
819
844
  when (key) {
820
845
  "rfidProcessingScreenFailureImage" -> input.setImage(CustomizationImage.RFID_PROCESSING_SCREEN_FAILURE_IMAGE, v.toDrawable())
821
846
  "rfidEnableNfcImage" -> input.setImage(CustomizationImage.RFID_ENABLE_NFC_IMAGE, v.toDrawable())
847
+ "mdlProcessingScreenFailureImage" -> input.setImage(CustomizationImage.MDL_PROCESSING_SCREEN_FAILURE_IMAGE, v.toDrawable())
848
+ "mdlEnableNfcImage" -> input.setImage(CustomizationImage.MDL_ENABLE_NFC_IMAGE, v.toDrawable())
822
849
  }
823
850
  }
824
851
 
825
852
  fun getImages(input: Map<CustomizationImage, Drawable>) = mapOf(
826
853
  "rfidProcessingScreenFailureImage" to (input[CustomizationImage.RFID_PROCESSING_SCREEN_FAILURE_IMAGE] ?: ContextCompat.getDrawable(context, com.regula.documentreader.api.R.drawable.reg_ic_error)).toBase64(),
827
854
  "rfidEnableNfcImage" to (input[CustomizationImage.RFID_ENABLE_NFC_IMAGE] ?: ContextCompat.getDrawable(context, com.regula.documentreader.api.R.drawable.reg_enable_nfc)).toBase64(),
855
+ "mdlProcessingScreenFailureImage" to (input[CustomizationImage.MDL_PROCESSING_SCREEN_FAILURE_IMAGE] ?: ContextCompat.getDrawable(context, com.regula.documentreader.api.R.drawable.reg_enable_nfc)).toBase64(),
856
+ "mdlEnableNfcImage" to (input[CustomizationImage.MDL_ENABLE_NFC_IMAGE] ?: ContextCompat.getDrawable(context, com.regula.documentreader.api.R.drawable.reg_enable_nfc)).toBase64(),
828
857
  ).toJson()
829
858
 
830
859
  fun CustomizationFont.getFont(fonts: Map<CustomizationFont, Typeface>, sizes: Map<CustomizationFont, Int>) =
@@ -29,6 +29,7 @@ import com.regula.documentreader.api.listener.NetworkInterceptorListener
29
29
  import com.regula.documentreader.api.params.AuthenticityParams
30
30
  import com.regula.documentreader.api.params.BackendProcessingConfig
31
31
  import com.regula.documentreader.api.params.BleDeviceConfig
32
+ import com.regula.documentreader.api.params.Bsi
32
33
  import com.regula.documentreader.api.params.DocReaderConfig
33
34
  import com.regula.documentreader.api.params.FaceApiParams
34
35
  import com.regula.documentreader.api.params.Functionality
@@ -325,6 +326,18 @@ fun generateBackendProcessingConfig(input: BackendProcessingConfig?) = input?.le
325
326
  ).toJson()
326
327
  }
327
328
 
329
+ fun bsiFromJSON(input: JSONObject?) = input?.let {
330
+ val result = Bsi()
331
+ result.generateResult = it.getBooleanOrNull("generateResult")
332
+ result
333
+ }
334
+
335
+ fun generateBsi(input: Bsi?) = input?.let {
336
+ mapOf(
337
+ "generateResult" to it.generateResult,
338
+ ).toJson()
339
+ }
340
+
328
341
  val weakReferencesHolder = mutableListOf<Any>()
329
342
  fun onlineProcessingConfigFromJSON(input: JSONObject?) = input?.let {
330
343
  val builder = OnlineProcessingConfig.Builder(it.getInt("mode"))
@@ -3051,9 +3051,9 @@
3051
3051
  }
3052
3052
  },
3053
3053
  "node_modules/tar": {
3054
- "version": "7.5.7",
3055
- "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz",
3056
- "integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==",
3054
+ "version": "7.5.9",
3055
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz",
3056
+ "integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==",
3057
3057
  "license": "BlueOak-1.0.0",
3058
3058
  "dependencies": {
3059
3059
  "@isaacs/fs-minipass": "^4.0.0",
@@ -6,7 +6,7 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/document-reader": "9.2.624-rc",
9
+ "@regulaforensics/document-reader": "9.2.631-rc",
10
10
  "@regulaforensics/document-reader-core-fullauthrfid": "9.2.1513",
11
11
  "@regulaforensics/document-reader-btdevice": "9.1.35",
12
12
  "@awesome-cordova-plugins/file": "^8.1.0",