scandit-capacitor-datacapture-barcode 6.21.0-beta.2 → 6.21.0-beta.3
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/ScanditCapacitorDatacaptureBarcode.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +36 -0
- package/dist/barcode.js +26 -37
- package/dist/barcode.js.map +1 -1
- package/dist/dts/definitions.d.ts +19 -6
- package/dist/dts/ts/Capacitor/BarcodeSelectionListenerProxy.d.ts +2 -2
- package/dist/dts/ts/Capacitor/BarcodeSelectionOverlayProxy.d.ts +15 -0
- package/dist/dts/ts/Capacitor/BarcodeTrackingAdvancedOverlayProxy.d.ts +1 -1
- package/dist/dts/ts/Capacitor/Capacitor.d.ts +3 -0
- package/dist/index.js +90 -19
- package/dist/index.js.map +1 -1
- package/ios/Plugin/CommandJSONArgument+ScanditBarcodeCapture.swift +3 -3
- package/ios/Plugin/Plugin.m +61 -55
- package/ios/Plugin/ScanditBarcodeCapture.swift +41 -5
- package/package.json +4 -4
|
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
|
|
18
18
|
s.dependency "Capacitor"
|
|
19
19
|
s.dependency "ScanditCapacitorDatacaptureCore", "= #{version}"
|
|
20
|
-
s.dependency "scandit-datacapture-frameworks-barcode", '= 6.21.0-beta.
|
|
20
|
+
s.dependency "scandit-datacapture-frameworks-barcode", '= 6.21.0-beta.3'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt
CHANGED
|
@@ -203,6 +203,12 @@ class ScanditBarcodeNative :
|
|
|
203
203
|
call.resolve()
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
@PluginMethod
|
|
207
|
+
fun unsubscribeBarcodeTrackingListener(call: PluginCall) {
|
|
208
|
+
barcodeTrackingModule.removeBarcodeTrackingListener()
|
|
209
|
+
call.resolve()
|
|
210
|
+
}
|
|
211
|
+
|
|
206
212
|
@PluginMethod
|
|
207
213
|
fun finishBarcodeTrackingDidUpdateSession(call: PluginCall) {
|
|
208
214
|
barcodeTrackingModule.finishDidUpdateSession(call.data.getBoolean("enabled"))
|
|
@@ -221,12 +227,24 @@ class ScanditBarcodeNative :
|
|
|
221
227
|
call.resolve()
|
|
222
228
|
}
|
|
223
229
|
|
|
230
|
+
@PluginMethod
|
|
231
|
+
fun unsubscribeBarcodeTrackingBasicOverlayListener(call: PluginCall) {
|
|
232
|
+
barcodeTrackingModule.removeBasicOverlayListener()
|
|
233
|
+
call.resolve()
|
|
234
|
+
}
|
|
235
|
+
|
|
224
236
|
@PluginMethod
|
|
225
237
|
fun subscribeBarcodeSelectionListener(call: PluginCall) {
|
|
226
238
|
barcodeSelectionModule.addListener()
|
|
227
239
|
call.resolve()
|
|
228
240
|
}
|
|
229
241
|
|
|
242
|
+
@PluginMethod
|
|
243
|
+
fun unsubscribeBarcodeSelectionListener(call: PluginCall) {
|
|
244
|
+
barcodeSelectionModule.removeListener()
|
|
245
|
+
call.resolve()
|
|
246
|
+
}
|
|
247
|
+
|
|
230
248
|
@PluginMethod
|
|
231
249
|
fun clearTrackedBarcodeBrushes(call: PluginCall) {
|
|
232
250
|
barcodeTrackingModule.clearBasicOverlayTrackedBarcodeBrushes()
|
|
@@ -251,6 +269,12 @@ class ScanditBarcodeNative :
|
|
|
251
269
|
call.resolve()
|
|
252
270
|
}
|
|
253
271
|
|
|
272
|
+
@PluginMethod
|
|
273
|
+
fun unsubscribeBarcodeTrackingAdvancedOverlayListener(call: PluginCall) {
|
|
274
|
+
barcodeTrackingModule.removeAdvancedOverlayListener()
|
|
275
|
+
call.resolve()
|
|
276
|
+
}
|
|
277
|
+
|
|
254
278
|
@PluginMethod
|
|
255
279
|
fun setViewForTrackedBarcode(call: PluginCall) {
|
|
256
280
|
try {
|
|
@@ -360,6 +384,18 @@ class ScanditBarcodeNative :
|
|
|
360
384
|
call.resolve()
|
|
361
385
|
}
|
|
362
386
|
|
|
387
|
+
@PluginMethod
|
|
388
|
+
fun finishBarcodeSelectionDidSelect(call: PluginCall) {
|
|
389
|
+
barcodeSelectionModule.finishDidSelect(call.data.getBoolean("enabled"))
|
|
390
|
+
call.resolve()
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@PluginMethod
|
|
394
|
+
fun finishBarcodeSelectionDidUpdateSession(call: PluginCall) {
|
|
395
|
+
barcodeSelectionModule.finishDidUpdateSession(call.data.getBoolean("enabled"))
|
|
396
|
+
call.resolve()
|
|
397
|
+
}
|
|
398
|
+
|
|
363
399
|
private fun onFinishBarcodeSelectionDidUpdateSession(
|
|
364
400
|
finishData: SerializableFinishModeCallbackData?
|
|
365
401
|
) {
|
package/dist/barcode.js
CHANGED
|
@@ -893,11 +893,7 @@ class SparkScan extends DefaultSerializeable {
|
|
|
893
893
|
}
|
|
894
894
|
set isEnabled(isEnabled) {
|
|
895
895
|
this._isEnabled = isEnabled;
|
|
896
|
-
|
|
897
|
-
// If we're "in" a listener callback, we don't want to deserialize the context to update the enabled state,
|
|
898
|
-
// but rather pass that back to be applied in the native callback.
|
|
899
|
-
this.listenerController.setModeEnabledState(isEnabled);
|
|
900
|
-
}
|
|
896
|
+
this.listenerController.setModeEnabledState(isEnabled);
|
|
901
897
|
}
|
|
902
898
|
get context() {
|
|
903
899
|
return this._context;
|
|
@@ -962,7 +958,7 @@ class SparkScan extends DefaultSerializeable {
|
|
|
962
958
|
}
|
|
963
959
|
}
|
|
964
960
|
__decorate([
|
|
965
|
-
|
|
961
|
+
ignoreFromSerialization
|
|
966
962
|
], SparkScan.prototype, "_isEnabled", void 0);
|
|
967
963
|
__decorate([
|
|
968
964
|
nameForSerialization('feedback')
|
|
@@ -1519,11 +1515,7 @@ class BarcodeCapture extends DefaultSerializeable {
|
|
|
1519
1515
|
}
|
|
1520
1516
|
set isEnabled(isEnabled) {
|
|
1521
1517
|
this._isEnabled = isEnabled;
|
|
1522
|
-
|
|
1523
|
-
// If we're "in" a listener callback, we don't want to deserialize the context to update the enabled state,
|
|
1524
|
-
// but rather pass that back to be applied in the native callback.
|
|
1525
|
-
this.controller.setModeEnabledState(isEnabled);
|
|
1526
|
-
}
|
|
1518
|
+
this.controller.setModeEnabledState(isEnabled);
|
|
1527
1519
|
}
|
|
1528
1520
|
get context() {
|
|
1529
1521
|
return this._context;
|
|
@@ -1596,7 +1588,7 @@ class BarcodeCapture extends DefaultSerializeable {
|
|
|
1596
1588
|
}
|
|
1597
1589
|
}
|
|
1598
1590
|
__decorate([
|
|
1599
|
-
|
|
1591
|
+
ignoreFromSerialization
|
|
1600
1592
|
], BarcodeCapture.prototype, "_isEnabled", void 0);
|
|
1601
1593
|
__decorate([
|
|
1602
1594
|
nameForSerialization('feedback')
|
|
@@ -1717,12 +1709,6 @@ var BarcodeCaptureOverlayStyle;
|
|
|
1717
1709
|
})(BarcodeCaptureOverlayStyle || (BarcodeCaptureOverlayStyle = {}));
|
|
1718
1710
|
|
|
1719
1711
|
class BarcodeCaptureSettings extends DefaultSerializeable {
|
|
1720
|
-
get codeDuplicateFilter() {
|
|
1721
|
-
return BarcodeCaptureSettings.barcodeCaptureDefaults.BarcodeCaptureSettings.codeDuplicateFilter;
|
|
1722
|
-
}
|
|
1723
|
-
set codeDuplicateFilter(value) {
|
|
1724
|
-
BarcodeCaptureSettings.barcodeCaptureDefaults.BarcodeCaptureSettings.codeDuplicateFilter = value;
|
|
1725
|
-
}
|
|
1726
1712
|
get enabledSymbologies() {
|
|
1727
1713
|
return Object.keys(this.symbologies)
|
|
1728
1714
|
.filter(symbology => this.symbologies[symbology].isEnabled);
|
|
@@ -1745,6 +1731,7 @@ class BarcodeCaptureSettings extends DefaultSerializeable {
|
|
|
1745
1731
|
this.enabledCompositeTypes = [];
|
|
1746
1732
|
this.properties = {};
|
|
1747
1733
|
this.symbologies = {};
|
|
1734
|
+
this._codeDuplicateFilter = BarcodeCaptureSettings.barcodeCaptureDefaults.BarcodeCaptureSettings.codeDuplicateFilter;
|
|
1748
1735
|
this._arucoDictionary = null;
|
|
1749
1736
|
}
|
|
1750
1737
|
settingsForSymbology(symbology) {
|
|
@@ -1775,10 +1762,19 @@ class BarcodeCaptureSettings extends DefaultSerializeable {
|
|
|
1775
1762
|
setArucoDictionary(dictionary) {
|
|
1776
1763
|
this._arucoDictionary = dictionary;
|
|
1777
1764
|
}
|
|
1765
|
+
get codeDuplicateFilter() {
|
|
1766
|
+
return this._codeDuplicateFilter;
|
|
1767
|
+
}
|
|
1768
|
+
set codeDuplicateFilter(value) {
|
|
1769
|
+
this._codeDuplicateFilter = value;
|
|
1770
|
+
}
|
|
1778
1771
|
}
|
|
1779
1772
|
__decorate([
|
|
1780
1773
|
serializationDefault(NoneLocationSelection)
|
|
1781
1774
|
], BarcodeCaptureSettings.prototype, "locationSelection", void 0);
|
|
1775
|
+
__decorate([
|
|
1776
|
+
nameForSerialization('codeDuplicateFilter')
|
|
1777
|
+
], BarcodeCaptureSettings.prototype, "_codeDuplicateFilter", void 0);
|
|
1782
1778
|
__decorate([
|
|
1783
1779
|
nameForSerialization('arucoDictionary')
|
|
1784
1780
|
], BarcodeCaptureSettings.prototype, "_arucoDictionary", void 0);
|
|
@@ -1936,11 +1932,7 @@ class BarcodeSelection extends DefaultSerializeable {
|
|
|
1936
1932
|
}
|
|
1937
1933
|
set isEnabled(isEnabled) {
|
|
1938
1934
|
this._isEnabled = isEnabled;
|
|
1939
|
-
|
|
1940
|
-
// If we're "in" a listener callback, we don't want to deserialize the context to update the enabled state,
|
|
1941
|
-
// but rather pass that back to be applied in the native callback.
|
|
1942
|
-
this.modeController.setModeEnabledState(isEnabled);
|
|
1943
|
-
}
|
|
1935
|
+
this.modeController.setModeEnabledState(isEnabled);
|
|
1944
1936
|
}
|
|
1945
1937
|
get context() {
|
|
1946
1938
|
return this._context;
|
|
@@ -2001,6 +1993,9 @@ class BarcodeSelection extends DefaultSerializeable {
|
|
|
2001
1993
|
return this.didChange();
|
|
2002
1994
|
}
|
|
2003
1995
|
addListener(listener) {
|
|
1996
|
+
if (listener == undefined) {
|
|
1997
|
+
return;
|
|
1998
|
+
}
|
|
2004
1999
|
if (this.listeners.includes(listener)) {
|
|
2005
2000
|
return;
|
|
2006
2001
|
}
|
|
@@ -2040,7 +2035,7 @@ class BarcodeSelection extends DefaultSerializeable {
|
|
|
2040
2035
|
}
|
|
2041
2036
|
}
|
|
2042
2037
|
__decorate([
|
|
2043
|
-
|
|
2038
|
+
ignoreFromSerialization
|
|
2044
2039
|
], BarcodeSelection.prototype, "_isEnabled", void 0);
|
|
2045
2040
|
__decorate([
|
|
2046
2041
|
nameForSerialization('feedback')
|
|
@@ -2115,6 +2110,7 @@ __decorate([
|
|
|
2115
2110
|
|
|
2116
2111
|
var BarcodeSelectionBrushProviderEvents;
|
|
2117
2112
|
(function (BarcodeSelectionBrushProviderEvents) {
|
|
2113
|
+
BarcodeSelectionBrushProviderEvents["inCallback"] = "BarcodeSelectionAimedBrushProvider.inCallback";
|
|
2118
2114
|
BarcodeSelectionBrushProviderEvents["brushForAimedBarcode"] = "BarcodeSelectionAimedBrushProvider.brushForBarcode";
|
|
2119
2115
|
BarcodeSelectionBrushProviderEvents["brushForTrackedBarcode"] = "BarcodeSelectionTrackedBrushProvider.brushForBarcode";
|
|
2120
2116
|
})(BarcodeSelectionBrushProviderEvents || (BarcodeSelectionBrushProviderEvents = {}));
|
|
@@ -2697,11 +2693,7 @@ class BarcodeCount extends DefaultSerializeable {
|
|
|
2697
2693
|
}
|
|
2698
2694
|
set isEnabled(isEnabled) {
|
|
2699
2695
|
this._isEnabled = isEnabled;
|
|
2700
|
-
|
|
2701
|
-
// If we're "in" a listener callback, we don't want to deserialize the context to update the enabled state,
|
|
2702
|
-
// but rather pass that back to be applied in the native callback.
|
|
2703
|
-
this.listenerController.setModeEnabledState(isEnabled);
|
|
2704
|
-
}
|
|
2696
|
+
this.listenerController.setModeEnabledState(isEnabled);
|
|
2705
2697
|
}
|
|
2706
2698
|
get context() {
|
|
2707
2699
|
return this._context;
|
|
@@ -2797,7 +2789,7 @@ __decorate([
|
|
|
2797
2789
|
nameForSerialization('feedback')
|
|
2798
2790
|
], BarcodeCount.prototype, "_feedback", void 0);
|
|
2799
2791
|
__decorate([
|
|
2800
|
-
|
|
2792
|
+
ignoreFromSerialization
|
|
2801
2793
|
], BarcodeCount.prototype, "_isEnabled", void 0);
|
|
2802
2794
|
__decorate([
|
|
2803
2795
|
ignoreFromSerialization
|
|
@@ -3151,11 +3143,7 @@ class BarcodeTracking extends DefaultSerializeable {
|
|
|
3151
3143
|
}
|
|
3152
3144
|
set isEnabled(isEnabled) {
|
|
3153
3145
|
this._isEnabled = isEnabled;
|
|
3154
|
-
|
|
3155
|
-
// If we're "in" a listener callback, we don't want to deserialize the context to update the enabled state,
|
|
3156
|
-
// but rather pass that back to be applied in the native callback.
|
|
3157
|
-
this.listenerController.setModeEnabledState(isEnabled);
|
|
3158
|
-
}
|
|
3146
|
+
this.listenerController.setModeEnabledState(isEnabled);
|
|
3159
3147
|
}
|
|
3160
3148
|
get context() {
|
|
3161
3149
|
return this._context;
|
|
@@ -3221,7 +3209,7 @@ class BarcodeTracking extends DefaultSerializeable {
|
|
|
3221
3209
|
}
|
|
3222
3210
|
}
|
|
3223
3211
|
__decorate([
|
|
3224
|
-
|
|
3212
|
+
ignoreFromSerialization
|
|
3225
3213
|
], BarcodeTracking.prototype, "_isEnabled", void 0);
|
|
3226
3214
|
__decorate([
|
|
3227
3215
|
ignoreFromSerialization
|
|
@@ -3314,8 +3302,9 @@ class BarcodeTrackingAdvancedOverlayController {
|
|
|
3314
3302
|
});
|
|
3315
3303
|
this.eventEmitter.on(BarcodeTrackingAdvancedOverlayListenerEvents.didTapViewForTrackedBarcode, (body) => {
|
|
3316
3304
|
var _a, _b;
|
|
3305
|
+
const payload = JSON.parse(body);
|
|
3317
3306
|
const trackedBarcode = TrackedBarcode
|
|
3318
|
-
.fromJSON(JSON.parse(
|
|
3307
|
+
.fromJSON(JSON.parse(payload.trackedBarcode));
|
|
3319
3308
|
(_b = (_a = this.overlay.listener) === null || _a === void 0 ? void 0 : _a.didTapViewForTrackedBarcode) === null || _b === void 0 ? void 0 : _b.call(_a, this.overlay, trackedBarcode);
|
|
3320
3309
|
});
|
|
3321
3310
|
}
|