@regulaforensics/document-reader 9.2.555-nightly → 9.2.556-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.
Files changed (33) hide show
  1. package/RNDocumentReader.podspec +2 -2
  2. package/android/build.gradle +2 -2
  3. package/android/cordova.gradle +2 -2
  4. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +1 -1
  5. package/examples/capacitor/package.json +1 -1
  6. package/examples/ionic/package-lock.json +436 -489
  7. package/examples/ionic/package.json +1 -1
  8. package/examples/react_native/package.json +1 -1
  9. package/ios/RGLWJSONConstructor.m +6 -4
  10. package/ios/RGLWMain.m +16 -22
  11. package/package.json +1 -1
  12. package/plugin.xml +2 -2
  13. package/test/json.tsx +2 -2
  14. package/test/package-lock.json +1 -1
  15. package/www/capacitor/index.js +5 -5
  16. package/www/cordova.js +1214 -1214
  17. package/www/react-native/index.js +5 -5
  18. package/www/types/index.d.ts +5 -5
  19. /package/www/capacitor/{engagement → mdl}/DataRetrieval.js +0 -0
  20. /package/www/capacitor/{engagement → mdl}/DeviceEngagement.js +0 -0
  21. /package/www/capacitor/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
  22. /package/www/capacitor/{engagement → mdl}/DocumentRequestMDL.js +0 -0
  23. /package/www/capacitor/{engagement → mdl}/NameSpaceMDL.js +0 -0
  24. /package/www/react-native/{engagement → mdl}/DataRetrieval.js +0 -0
  25. /package/www/react-native/{engagement → mdl}/DeviceEngagement.js +0 -0
  26. /package/www/react-native/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
  27. /package/www/react-native/{engagement → mdl}/DocumentRequestMDL.js +0 -0
  28. /package/www/react-native/{engagement → mdl}/NameSpaceMDL.js +0 -0
  29. /package/www/types/{engagement → mdl}/DataRetrieval.d.ts +0 -0
  30. /package/www/types/{engagement → mdl}/DeviceEngagement.d.ts +0 -0
  31. /package/www/types/{engagement → mdl}/DeviceRetrievalMethod.d.ts +0 -0
  32. /package/www/types/{engagement → mdl}/DocumentRequestMDL.d.ts +0 -0
  33. /package/www/types/{engagement → mdl}/NameSpaceMDL.d.ts +0 -0
@@ -18,7 +18,7 @@
18
18
  "@ionic/cordova-builders": "^12.3.0",
19
19
  "@awesome-cordova-plugins/camera": "^8.1.0",
20
20
  "@awesome-cordova-plugins/file": "^8.1.0",
21
- "@regulaforensics/document-reader": "9.2.555-nightly",
21
+ "@regulaforensics/document-reader": "9.2.556-beta",
22
22
  "@regulaforensics/document-reader-core-fullauthrfid": "9.1.1281",
23
23
  "@regulaforensics/document-reader-btdevice": "9.1.35",
24
24
  "cordova-android": "^14.0.1",
@@ -8,7 +8,7 @@
8
8
  "start": "expo start"
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/document-reader": "9.2.555-nightly",
11
+ "@regulaforensics/document-reader": "9.2.556-beta",
12
12
  "@regulaforensics/document-reader-core-fullauthrfid": "9.1.1281",
13
13
  "@regulaforensics/document-reader-btdevice": "9.1.35",
14
14
  "react-native": "^0.81.4",
@@ -2408,7 +2408,10 @@ static NSMutableArray* weakReferencesHolder;
2408
2408
  +(RGLNameSpaceMDL*)nameSpaceMDLFromJson:(NSDictionary*)input {
2409
2409
  RGLNameSpaceMDL* result = [[RGLNameSpaceMDL alloc] initWithName:input[@"name"]];
2410
2410
 
2411
- [result setValue:input[@"map"] forKey:@"jsonDict"];
2411
+ NSDictionary* map = input[@"map"];
2412
+ for (NSString* key in map) {
2413
+ [result addField:key intentToRetain:[map[key] integerValue]];
2414
+ }
2412
2415
 
2413
2416
  return result;
2414
2417
 
@@ -2562,8 +2565,8 @@ static NSMutableArray* weakReferencesHolder;
2562
2565
  +(RGLDataRetrieval*)dataRetrievalFromJson:(NSDictionary*)input {
2563
2566
  RGLDataRetrieval* result = [[RGLDataRetrieval alloc] initWithDeviceRetrieval:[input[@"deviceRetrieval"] integerValue]];
2564
2567
 
2565
- [result setValue:input[@"docRequestPreset"] forKey:@"docRequestPreset"];
2566
- [result setValue:input[@"intentToRetain"] forKey:@"intentToRetain"];
2568
+ if (input[@"docRequestPreset"])
2569
+ [result setDocRequestPreset:[input[@"docRequestPreset"] integerValue] intentToRetain:[input[@"intentToRetain"] integerValue]];
2567
2570
 
2568
2571
  NSMutableArray<RGLDocumentRequestMDL*>* requests = [NSMutableArray new];
2569
2572
  for(NSDictionary* item in [input valueForKey:@"requests"]){
@@ -2572,7 +2575,6 @@ static NSMutableArray* weakReferencesHolder;
2572
2575
  result.requests = requests;
2573
2576
 
2574
2577
  return result;
2575
-
2576
2578
  }
2577
2579
 
2578
2580
  +(NSDictionary*)generateDataRetrieval:(RGLDataRetrieval*)input {
package/ios/RGLWMain.m CHANGED
@@ -36,7 +36,7 @@
36
36
  @"runAutoUpdate": ^{ [self runAutoUpdate :args[0] :callback]; },
37
37
  @"cancelDBUpdate": ^{ [self cancelDBUpdate :callback]; },
38
38
  @"checkDatabaseUpdate": ^{ [self checkDatabaseUpdate :args[0] :callback]; },
39
- @"scan": ^{ [self scan :args[0]]; },
39
+ @"scan": ^{ [self startScanner :args[0]]; },
40
40
  @"startScanner": ^{ [self startScanner :args[0]]; },
41
41
  @"recognize": ^{ [self recognize :args[0]]; },
42
42
  @"startNewPage": ^{ [self startNewPage]; },
@@ -226,20 +226,8 @@ static NSDictionary* headers;
226
226
  }];
227
227
  }
228
228
 
229
- +(void)scan:(NSDictionary*)config {
230
- dispatch_async(dispatch_get_main_queue(), ^{
231
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
232
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
233
- #pragma clang diagnostic pop
234
- [RGLDocReader.shared showScannerFromPresenter:RGLWRootViewController() config:[RGLWJSONConstructor scannerConfigFromJson:config] completion:[self completion]];
235
- });
236
- }
237
-
238
229
  +(void)startScanner:(NSDictionary*)config {
239
230
  dispatch_async(dispatch_get_main_queue(), ^{
240
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
241
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
242
- #pragma clang diagnostic pop
243
231
  [RGLDocReader.shared startScannerFromPresenter:RGLWRootViewController() config:[RGLWJSONConstructor scannerConfigFromJson:config] completion:[self completion]];
244
232
  });
245
233
  }
@@ -365,21 +353,27 @@ RGLWCallback savedCallbackForBluetoothResult;
365
353
  }
366
354
 
367
355
  +(void)startReadMDl:(NSNumber*)type :(NSDictionary*)dataRetrieval :(RGLWCallback)callback {
368
- [RGLDocReader.shared startReadMDLFromPresenter:RGLWRootViewController() engagementType:[type integerValue] dataRetrieval:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
369
- callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
370
- }];
356
+ dispatch_async(dispatch_get_main_queue(), ^{
357
+ [RGLDocReader.shared startReadMDLFromPresenter:RGLWRootViewController() engagementType:[type integerValue] dataRetrieval:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
358
+ callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
359
+ }];
360
+ });
371
361
  }
372
362
 
373
363
  +(void)startEngageDevice:(NSNumber*)type :(RGLWCallback)callback {
374
- [RGLDocReader.shared startEngageDeviceFromPresenter:RGLWRootViewController() type:[type integerValue] completion:^(RGLDeviceEngagement* deviceEngagement, NSError* error) {
375
- callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
376
- }];
364
+ dispatch_async(dispatch_get_main_queue(), ^{
365
+ [RGLDocReader.shared startEngageDeviceFromPresenter:RGLWRootViewController() type:[type integerValue] completion:^(RGLDeviceEngagement* deviceEngagement, NSError* error) {
366
+ callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
367
+ }];
368
+ });
377
369
  }
378
370
 
379
371
  +(void)engageDeviceNFC:(RGLWCallback)callback {
380
- [RGLDocReader.shared engageDeviceNFC:RGLWRootViewController() completion:^(RGLDeviceEngagement * _Nullable deviceEngagement, NSError * _Nullable error) {
381
- callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
382
- }];
372
+ dispatch_async(dispatch_get_main_queue(), ^{
373
+ [RGLDocReader.shared engageDeviceNFC:RGLWRootViewController() completion:^(RGLDeviceEngagement * _Nullable deviceEngagement, NSError * _Nullable error) {
374
+ callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
375
+ }];
376
+ });
383
377
  }
384
378
 
385
379
  +(void)engageDeviceData:(NSString*)data :(RGLWCallback)callback {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/document-reader",
3
- "version": "9.2.555-nightly",
3
+ "version": "9.2.556-beta",
4
4
  "description": "This is an npm module for Regula Document Reader SDK. It allows you to read various kinds of identification documents using your phone's camera.",
5
5
  "main": "www/react-native/index.js",
6
6
  "module": "www/capacitor/index.js",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="@regulaforensics/document-reader" version="9.2.555-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/document-reader" version="9.2.556-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
3
3
  <name>DocumentReader</name>
4
4
  <description>Cordova plugin for Regula Document Reader SDK</description>
5
5
  <license>commercial</license>
@@ -29,7 +29,7 @@
29
29
  <source url="https://github.com/CocoaPods/Specs.git" />
30
30
  </config>
31
31
  <pods>
32
- <pod name="DocumentReaderNightly" spec="9.2.5819" />
32
+ <pod name="DocumentReader" spec="9.1.5702" />
33
33
  </pods>
34
34
  </podspec>
35
35
  </platform>
package/test/json.tsx CHANGED
@@ -979,8 +979,8 @@ export var documentRequest18013MDL = {
979
979
  "signatureUsualMark": 0,
980
980
  };
981
981
  export var dataRetrieval = {
982
+ "docRequestPreset": 0,
983
+ "intentToRetain": 1,
982
984
  "deviceRetrieval": 2,
983
- "docRequestPreset": 1,
984
- "intentToRetain": 0,
985
985
  "requests": [documentRequestMDL, documentRequest18013MDL],
986
986
  };
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/document-reader",
16
- "version": "9.2.555-nightly",
16
+ "version": "9.2.556-beta",
17
17
  "dev": true,
18
18
  "license": "commercial"
19
19
  },
@@ -134,11 +134,11 @@ import { TAChallenge } from './rfid/TAChallenge';
134
134
  import { PKDCertificate, PKDResourceType } from './rfid/PKDCertificate';
135
135
  export { PAResourcesIssuer, RFIDErrorCodes, TccParams, RFIDNotification, RFIDNotificationCodes, PAAttribute, TAChallenge, PKDCertificate, PKDResourceType };
136
136
 
137
- import { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval } from './engagement/DataRetrieval';
138
- import { DeviceEngagement, MDLDeviceEngagement } from './engagement/DeviceEngagement';
139
- import { NameSpaceMDL, MDLIntentToRetain } from './engagement/NameSpaceMDL';
140
- import { DocumentRequestMDL, DocumentRequest18013MDL } from './engagement/DocumentRequestMDL';
141
- import { DeviceRetrievalMethod } from './engagement/DeviceRetrievalMethod';
137
+ import { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval } from './mdl/DataRetrieval';
138
+ import { DeviceEngagement, MDLDeviceEngagement } from './mdl/DeviceEngagement';
139
+ import { NameSpaceMDL, MDLIntentToRetain } from './mdl/NameSpaceMDL';
140
+ import { DocumentRequestMDL, DocumentRequest18013MDL } from './mdl/DocumentRequestMDL';
141
+ import { DeviceRetrievalMethod } from './mdl/DeviceRetrievalMethod';
142
142
  export { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval, DeviceEngagement, MDLDeviceEngagement, DeviceRetrievalMethod, DocumentRequest18013MDL, MDLIntentToRetain, NameSpaceMDL, DocumentRequestMDL };
143
143
 
144
144
  export class DocumentReader {