@scrumble-nl/react-native-honeywell-scanner 1.3.7 → 1.3.9
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/dist/index.d.ts +3 -1
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,9 @@ declare class Honeywell implements Scanner {
|
|
|
16
16
|
subscriptionBarcodeReadSuccess: any;
|
|
17
17
|
subscriptionBarcodeReadFail: any;
|
|
18
18
|
constructor();
|
|
19
|
-
registerListener: (event:
|
|
19
|
+
registerListener: (event: (event: {
|
|
20
|
+
data: string;
|
|
21
|
+
}) => void) => void;
|
|
20
22
|
clearEventListeners: () => void;
|
|
21
23
|
onBarcodeReadFail: (event: (event: {
|
|
22
24
|
data: string;
|
package/dist/index.js
CHANGED
|
@@ -11,19 +11,24 @@ class Honeywell {
|
|
|
11
11
|
var _a;
|
|
12
12
|
console.log('register event 2: ', event);
|
|
13
13
|
(_a = this.subscriptionBarcodeReadSuccess) === null || _a === void 0 ? void 0 : _a.remove();
|
|
14
|
-
this.subscriptionBarcodeReadSuccess =
|
|
14
|
+
this.subscriptionBarcodeReadSuccess = null;
|
|
15
|
+
this.subscriptionBarcodeReadSuccess = barcodeReaderEmitter.addListener(HoneywellScanner.BARCODE_READ_SUCCESS, event);
|
|
16
|
+
console.log('success', this.subscriptionBarcodeReadSuccess);
|
|
15
17
|
});
|
|
16
18
|
};
|
|
17
19
|
this.clearEventListeners = () => {
|
|
20
|
+
console.log('clear 1');
|
|
18
21
|
HoneywellScanner.stopReader().then(() => {
|
|
19
22
|
var _a;
|
|
23
|
+
console.log('clear 2');
|
|
20
24
|
(_a = this.subscriptionBarcodeReadSuccess) === null || _a === void 0 ? void 0 : _a.remove();
|
|
21
25
|
});
|
|
22
26
|
};
|
|
23
27
|
this.onBarcodeReadFail = (event) => {
|
|
24
28
|
var _a;
|
|
25
29
|
(_a = this.subscriptionBarcodeReadFail) === null || _a === void 0 ? void 0 : _a.remove();
|
|
26
|
-
this.subscriptionBarcodeReadFail =
|
|
30
|
+
this.subscriptionBarcodeReadFail = null;
|
|
31
|
+
this.subscriptionBarcodeReadFail = barcodeReaderEmitter.addListener(HoneywellScanner.BARCODE_READ_FAIL, event);
|
|
27
32
|
};
|
|
28
33
|
this.subscriptionBarcodeReadSuccess = null;
|
|
29
34
|
this.subscriptionBarcodeReadFail = null;
|
package/package.json
CHANGED