dynamsoft-capture-vision-react-native 1.1.1 → 1.1.4-beta09052010

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.
@@ -1,22 +1,22 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = package["name"]
7
- s.version = package["version"]
8
- s.summary = package["description"]
9
- s.homepage = package["homepage"]
10
-
11
- s.authors = { package["author"]["name"] => package["author"]["email"] }
12
- s.platforms = { :ios => "10.0" }
13
- s.source = { :git => "https://github.com/Dynamsoft/capture-vision-react-native.git", :tag => "#{s.version}" }
14
- s.source_files = "ios/RNDynamsoftCaptureVision/**/*.{h,m}"
15
- s.requires_arc = true
16
- s.module_name = "RNDynamsoftCaptureVision"
17
- s.header_dir = "RNDynamsoftCaptureVision"
18
- s.dependency 'DynamsoftCameraEnhancer', '= 2.3.0'
19
- s.dependency 'DynamsoftBarcodeReader', '= 9.2.10'
20
-
21
- s.dependency "React"
22
- end
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = package["name"]
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+
11
+ s.authors = { package["author"]["name"] => package["author"]["email"] }
12
+ s.platforms = { :ios => "10.0" }
13
+ s.source = { :git => "https://github.com/Dynamsoft/capture-vision-react-native.git", :tag => "#{s.version}" }
14
+ s.source_files = "ios/RNDynamsoftCaptureVision/**/*.{h,m}"
15
+ s.requires_arc = true
16
+ s.module_name = "RNDynamsoftCaptureVision"
17
+ s.header_dir = "RNDynamsoftCaptureVision"
18
+ s.dependency 'DynamsoftCameraEnhancer', '= 2.3.2'
19
+ s.dependency 'DynamsoftBarcodeReader', '= 9.2.12'
20
+
21
+ s.dependency "React"
22
+ end
@@ -11,10 +11,10 @@
11
11
 
12
12
  @implementation DYSCameraView
13
13
 
14
- @synthesize overlayVisible;
14
+ @synthesize overlayVisible = _overlayVisible;
15
15
  @synthesize scanRegionVisible = _scanRegionVisible;
16
- @synthesize scanRegion;
17
- @synthesize torchState;
16
+ @synthesize scanRegion = _scanRegion;
17
+ @synthesize torchState = _torchState;
18
18
  @synthesize torchButton = _torchButton;
19
19
 
20
20
  - (instancetype)init {
@@ -31,6 +31,7 @@
31
31
  }
32
32
 
33
33
  - (void)setOverlayVisible:(BOOL)overlayVisible{
34
+ _overlayVisible = overlayVisible;
34
35
  [StaticClass instance].view.overlayVisible = overlayVisible;
35
36
  }
36
37
 
@@ -44,6 +45,7 @@
44
45
  }
45
46
 
46
47
  - (void)setTorchState:(int)torchState{
48
+ _torchState = torchState;
47
49
  if (torchState == 1) {
48
50
  [[StaticClass instance].dce turnOnTorch];
49
51
  }else if (torchState == 0){
@@ -53,6 +55,7 @@
53
55
 
54
56
  - (void)setTorchButton:(NSDictionary *)torchButton{
55
57
  if (torchButton) {
58
+ _torchButton = torchButton;
56
59
  NSString *torchOnImageBase64 = [torchButton valueForKey:@"torchOnImageBase64"];
57
60
  NSString *torchOffImageBase64 = [torchButton valueForKey:@"torchOffImageBase64"];
58
61
  BOOL visible = [[torchButton valueForKey:@"visible"] boolValue];
@@ -85,6 +88,7 @@
85
88
 
86
89
  - (void)setScanRegion:(NSDictionary *)scanRegion{
87
90
  if (scanRegion) {
91
+ _scanRegion = scanRegion;
88
92
  NSNumber *regionTop = [scanRegion valueForKey:@"regionTop"];
89
93
  NSNumber *regionLeft = [scanRegion valueForKey:@"regionLeft"];
90
94
  NSNumber *regionRight = [scanRegion valueForKey:@"regionRight"];
@@ -110,4 +114,4 @@
110
114
  [[StaticClass instance].dce close];
111
115
  }
112
116
 
113
- @end
117
+ @end
@@ -1,25 +1,25 @@
1
- import { Quadrilateral } from "./BasicStructures";
2
- export interface BarcodeResult {
3
- /**
4
- * The barcode text.
5
- */
6
- barcodeText: string;
7
- /**
8
- * Barcode type in string.
9
- */
10
- barcodeFormatString: string;
11
- /**
12
- * The corresponding localization result.
13
- */
14
- barcodeLocation: BarcodeLocationResult;
15
- }
16
- export interface BarcodeLocationResult {
17
- /**
18
- * The angle of a barcode. Values range from 0 to 360.
19
- */
20
- angle: number;
21
- /**
22
- * The quadrilateral
23
- */
24
- quadrilateral: Quadrilateral;
25
- }
1
+ import { Quadrilateral } from "./BasicStructures";
2
+ export interface BarcodeResult {
3
+ /**
4
+ * The barcode text.
5
+ */
6
+ barcodeText: string;
7
+ /**
8
+ * Barcode type in string.
9
+ */
10
+ barcodeFormatString: string;
11
+ /**
12
+ * The corresponding localization result.
13
+ */
14
+ barcodeLocation: BarcodeLocationResult;
15
+ }
16
+ export interface BarcodeLocationResult {
17
+ /**
18
+ * The angle of a barcode. Values range from 0 to 360.
19
+ */
20
+ angle: number;
21
+ /**
22
+ * The quadrilateral
23
+ */
24
+ quadrilateral: Quadrilateral;
25
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=BarcodeResult.js.map
@@ -1,20 +1,20 @@
1
- export interface Quadrilateral {
2
- points: Point[];
3
- }
4
- export interface Point {
5
- x: number;
6
- y: number;
7
- }
8
- export interface Region {
9
- regionBottom: number;
10
- regionRight: number;
11
- regionLeft: number;
12
- regionTop: number;
13
- regionMeasuredByPercentage: number | boolean;
14
- }
15
- export interface Rect {
16
- x: number;
17
- y: number;
18
- width: number;
19
- height: number;
20
- }
1
+ export interface Quadrilateral {
2
+ points: Point[];
3
+ }
4
+ export interface Point {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export interface Region {
9
+ regionBottom: number;
10
+ regionRight: number;
11
+ regionLeft: number;
12
+ regionTop: number;
13
+ regionMeasuredByPercentage: number | boolean;
14
+ }
15
+ export interface Rect {
16
+ x: number;
17
+ y: number;
18
+ width: number;
19
+ height: number;
20
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=BasicStructures.js.map
@@ -1,11 +1,11 @@
1
- import { Rect } from "./BasicStructures";
2
- export interface TorchButton {
3
- location: Rect;
4
- visible: boolean;
5
- torchOnImageBase64: string;
6
- torchOffImageBase64: string;
7
- }
8
- export declare enum EnumTorchState {
9
- OFF = 0,
10
- ON = 1
11
- }
1
+ import { Rect } from "./BasicStructures";
2
+ export interface TorchButton {
3
+ location: Rect;
4
+ visible: boolean;
5
+ torchOnImageBase64: string;
6
+ torchOffImageBase64: string;
7
+ }
8
+ export declare enum EnumTorchState {
9
+ OFF = 0,
10
+ ON = 1
11
+ }
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnumTorchState = void 0;
4
- var EnumTorchState;
5
- (function (EnumTorchState) {
6
- EnumTorchState[EnumTorchState["OFF"] = 0] = "OFF";
7
- EnumTorchState[EnumTorchState["ON"] = 1] = "ON";
8
- })(EnumTorchState = exports.EnumTorchState || (exports.EnumTorchState = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnumTorchState = void 0;
4
+ var EnumTorchState;
5
+ (function (EnumTorchState) {
6
+ EnumTorchState[EnumTorchState["OFF"] = 0] = "OFF";
7
+ EnumTorchState[EnumTorchState["ON"] = 1] = "ON";
8
+ })(EnumTorchState = exports.EnumTorchState || (exports.EnumTorchState = {}));
9
9
  //# sourceMappingURL=CameraSettings.js.map
@@ -1,76 +1,76 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DynamsoftBarcodeReader = void 0;
13
- const react_native_1 = require("react-native");
14
- const DBRModule = react_native_1.NativeModules.RNDynamsoftBarcodeReader;
15
- const DBREventEmitter = new react_native_1.NativeEventEmitter(DBRModule);
16
- class DynamsoftBarcodeReader {
17
- static initLicense(license) {
18
- return __awaiter(this, void 0, void 0, function* () {
19
- try {
20
- return yield DBRModule.initLicense(license);
21
- }
22
- catch (e) {
23
- throw (e);
24
- }
25
- });
26
- }
27
- static createInstance() {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- yield DBRModule.createInstance();
30
- return new DynamsoftBarcodeReader();
31
- });
32
- }
33
- getVersion() {
34
- return DBRModule.getVersion();
35
- }
36
- getRuntimeSettings() {
37
- return DBRModule.getSettings();
38
- }
39
- resetRuntimeSettings() {
40
- return DBRModule.resetSettings();
41
- }
42
- outputRuntimeSettingsToString() {
43
- return DBRModule.outputSettings();
44
- }
45
- updateRuntimeSettings(settings) {
46
- if (typeof settings === 'object') {
47
- return DBRModule.updateSettingsFromDictionary(settings);
48
- }
49
- else if (typeof settings === 'number') {
50
- return DBRModule.updateSettingsFromNumber(settings);
51
- }
52
- else if (typeof settings === 'string') {
53
- return DBRModule.updateSettingsFromString(settings);
54
- }
55
- else {
56
- return new Promise((reslove, reject) => { reject(false); });
57
- }
58
- }
59
- startScanning() {
60
- return DBRModule.startBarcodeScanning();
61
- }
62
- stopScanning() {
63
- return DBRModule.stopBarcodeScanning();
64
- }
65
- addResultListener(listener) {
66
- if (react_native_1.Platform.OS === 'android') {
67
- DBRModule.addResultListener();
68
- }
69
- DBREventEmitter.addListener('resultEvent', listener);
70
- }
71
- removeAllResultListeners() {
72
- DBREventEmitter.removeAllListeners('resultEvent');
73
- }
74
- }
75
- exports.DynamsoftBarcodeReader = DynamsoftBarcodeReader;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DynamsoftBarcodeReader = void 0;
13
+ const react_native_1 = require("react-native");
14
+ const DBRModule = react_native_1.NativeModules.RNDynamsoftBarcodeReader;
15
+ const DBREventEmitter = new react_native_1.NativeEventEmitter(DBRModule);
16
+ class DynamsoftBarcodeReader {
17
+ static initLicense(license) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ try {
20
+ return yield DBRModule.initLicense(license);
21
+ }
22
+ catch (e) {
23
+ throw (e);
24
+ }
25
+ });
26
+ }
27
+ static createInstance() {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ yield DBRModule.createInstance();
30
+ return new DynamsoftBarcodeReader();
31
+ });
32
+ }
33
+ getVersion() {
34
+ return DBRModule.getVersion();
35
+ }
36
+ getRuntimeSettings() {
37
+ return DBRModule.getSettings();
38
+ }
39
+ resetRuntimeSettings() {
40
+ return DBRModule.resetSettings();
41
+ }
42
+ outputRuntimeSettingsToString() {
43
+ return DBRModule.outputSettings();
44
+ }
45
+ updateRuntimeSettings(settings) {
46
+ if (typeof settings === 'object') {
47
+ return DBRModule.updateSettingsFromDictionary(settings);
48
+ }
49
+ else if (typeof settings === 'number') {
50
+ return DBRModule.updateSettingsFromNumber(settings);
51
+ }
52
+ else if (typeof settings === 'string') {
53
+ return DBRModule.updateSettingsFromString(settings);
54
+ }
55
+ else {
56
+ return new Promise((reslove, reject) => { reject(false); });
57
+ }
58
+ }
59
+ startScanning() {
60
+ return DBRModule.startBarcodeScanning();
61
+ }
62
+ stopScanning() {
63
+ return DBRModule.stopBarcodeScanning();
64
+ }
65
+ addResultListener(listener) {
66
+ if (react_native_1.Platform.OS === 'android') {
67
+ DBRModule.addResultListener();
68
+ }
69
+ DBREventEmitter.addListener('resultEvent', listener);
70
+ }
71
+ removeAllResultListeners() {
72
+ DBREventEmitter.removeAllListeners('resultEvent');
73
+ }
74
+ }
75
+ exports.DynamsoftBarcodeReader = DynamsoftBarcodeReader;
76
76
  //# sourceMappingURL=DynamsoftBarcodeReader.js.map
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "dynamsoft-capture-vision-react-native",
3
- "version": "1.1.1",
4
- "description": "Dynamsoft Capture Vision React Native SDK",
5
- "homepage": "https://www.dynamsoft.com/capture-vision/docs/introduction",
6
- "main": "./js/index.js",
7
- "types": "./js/index.d.ts",
8
- "license": "SEE LICENSE",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/dynamsoft/capture-vision-react-native.git"
12
- },
13
- "scripts": {
14
- "android": "react-native run-android",
15
- "ios": "react-native run-ios"
16
- },
17
- "keywords": [
18
- "react-native",
19
- "barcode",
20
- "PDF417",
21
- "QRCode",
22
- "DataMatrix",
23
- "Linear barcode",
24
- "1D barcode"
25
- ],
26
- "author": {
27
- "name": "Dynamsoft",
28
- "url": "https://www.dynamsoft.com",
29
- "email": "support@dynamsoft.com"
30
- },
31
- "devDependencies": {
32
- "@types/jest": "^28.1.3",
33
- "@types/react": "^18.0.14",
34
- "@types/react-native": "^0.68.0",
35
- "@types/react-test-renderer": "^18.0.0",
36
- "typescript": "^4.7.4"
37
- }
38
- }
1
+ {
2
+ "name": "dynamsoft-capture-vision-react-native",
3
+ "version": "1.1.4-beta09052010",
4
+ "description": "Dynamsoft Capture Vision React Native SDK",
5
+ "homepage": "https://www.dynamsoft.com/capture-vision/docs/introduction",
6
+ "main": "./js/index.js",
7
+ "types": "./js/index.d.ts",
8
+ "license": "SEE LICENSE",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/dynamsoft/capture-vision-react-native.git"
12
+ },
13
+ "scripts": {
14
+ "android": "react-native run-android",
15
+ "ios": "react-native run-ios"
16
+ },
17
+ "keywords": [
18
+ "react-native",
19
+ "barcode",
20
+ "PDF417",
21
+ "QRCode",
22
+ "DataMatrix",
23
+ "Linear barcode",
24
+ "1D barcode"
25
+ ],
26
+ "author": {
27
+ "name": "Dynamsoft",
28
+ "url": "https://www.dynamsoft.com",
29
+ "email": "support@dynamsoft.com"
30
+ },
31
+ "devDependencies": {
32
+ "@types/jest": "^28.1.3",
33
+ "@types/react": "^18.0.14",
34
+ "@types/react-native": "^0.68.0",
35
+ "@types/react-test-renderer": "^18.0.0",
36
+ "typescript": "^4.7.4"
37
+ }
38
+ }