scandit-capacitor-datacapture-barcode 7.0.2 → 7.1.0-beta.1
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 +2 -2
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +53 -19
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/count/BarcodeCountViewHandler.kt +1 -1
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/pick/BarcodePickViewHandler.kt +2 -2
- package/dist/barcode.js +3828 -774
- package/dist/barcode.js.map +1 -1
- package/dist/dts/definitions.d.ts +16 -4
- package/dist/dts/ts/BarcodeCountView.d.ts +27 -65
- package/dist/dts/ts/BarcodeFindView.d.ts +3 -0
- package/dist/dts/ts/Capacitor/BarcodeCountSessionProxy.d.ts +3 -5
- package/dist/dts/ts/Capacitor/BarcodeCountViewProxy.d.ts +22 -24
- package/dist/dts/ts/Capacitor/BarcodeGeneratorProxy.d.ts +3 -2
- package/dist/dts/ts/Capacitor/BarcodePickViewProxy.d.ts +1 -0
- package/dist/dts/ts/Capacitor/BarcodeSelectionListenerProxy.d.ts +2 -1
- package/dist/dts/ts/Capacitor/Capacitor.d.ts +2 -0
- package/dist/index.js +2660 -3156
- package/dist/index.js.map +1 -1
- package/ios/Plugin/BarcodeCountViewHandler.swift +4 -17
- package/ios/Plugin/BarcodeFindViewHandler.swift +0 -8
- package/ios/Plugin/BarcodePickViewHandler.swift +0 -8
- package/ios/Plugin/Plugin.m +6 -1
- package/ios/Plugin/ScanditBarcodeCapture.swift +56 -21
- 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", '= 7.0.
|
|
20
|
+
s.dependency "scandit-datacapture-frameworks-barcode", '= 7.1.0-beta.1'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
|
@@ -11,7 +11,7 @@ def safeExtGet(prop, fallback) {
|
|
|
11
11
|
buildscript {
|
|
12
12
|
ext {
|
|
13
13
|
kotlin_version = "1.8.20"
|
|
14
|
-
agp_version = "8.1
|
|
14
|
+
agp_version = "8.5.1"
|
|
15
15
|
}
|
|
16
16
|
repositories {
|
|
17
17
|
google()
|
|
@@ -56,7 +56,7 @@ repositories {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
dependencies {
|
|
59
|
-
def sdk_version = "7.0.
|
|
59
|
+
def sdk_version = "7.1.0-beta.1"
|
|
60
60
|
|
|
61
61
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
62
62
|
implementation fileTree(dir: 'library', include: ['*.aar'])
|
package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt
CHANGED
|
@@ -540,11 +540,9 @@ class ScanditBarcodeNative :
|
|
|
540
540
|
|
|
541
541
|
@PluginMethod
|
|
542
542
|
fun getCountForBarcodeInBarcodeSelectionSession(call: PluginCall) {
|
|
543
|
-
|
|
544
|
-
call.data.getString("selectionIdentifier").orEmpty()
|
|
545
|
-
|
|
546
|
-
CapacitorResult(call).success(
|
|
547
|
-
mapOf("data" to count)
|
|
543
|
+
barcodeSelectionModule.submitBarcodeCountForIdentifier(
|
|
544
|
+
call.data.getString("selectionIdentifier").orEmpty(),
|
|
545
|
+
CapacitorResult(call)
|
|
548
546
|
)
|
|
549
547
|
}
|
|
550
548
|
|
|
@@ -653,6 +651,13 @@ class ScanditBarcodeNative :
|
|
|
653
651
|
call.resolve()
|
|
654
652
|
}
|
|
655
653
|
|
|
654
|
+
@PluginMethod
|
|
655
|
+
fun removeView(call: PluginCall) {
|
|
656
|
+
barcodeCountModule.viewDisposed()
|
|
657
|
+
barcodeCountViewHandler.disposeCurrentView()
|
|
658
|
+
call.resolve()
|
|
659
|
+
}
|
|
660
|
+
|
|
656
661
|
@PluginMethod
|
|
657
662
|
fun updateView(call: PluginCall) {
|
|
658
663
|
val view = barcodeCountViewHandler.barcodeCountView
|
|
@@ -776,8 +781,7 @@ class ScanditBarcodeNative :
|
|
|
776
781
|
|
|
777
782
|
@PluginMethod
|
|
778
783
|
fun getSpatialMap(call: PluginCall) {
|
|
779
|
-
|
|
780
|
-
call.resolve(JSObject().putSafe("data", map?.toJson()))
|
|
784
|
+
barcodeCountModule.submitSpatialMap(CapacitorResult(call))
|
|
781
785
|
}
|
|
782
786
|
|
|
783
787
|
@PluginMethod
|
|
@@ -786,8 +790,11 @@ class ScanditBarcodeNative :
|
|
|
786
790
|
?: return call.reject("No expectedNumberOfRows was provided for the function.")
|
|
787
791
|
val expectedNumberOfColumns = call.data.getInteger("expectedNumberOfColumns")
|
|
788
792
|
?: return call.reject("No expectedNumberOfColumns was provided for the function.")
|
|
789
|
-
|
|
790
|
-
|
|
793
|
+
barcodeCountModule.submitSpatialMap(
|
|
794
|
+
expectedNumberOfRows,
|
|
795
|
+
expectedNumberOfColumns,
|
|
796
|
+
CapacitorResult(call)
|
|
797
|
+
)
|
|
791
798
|
}
|
|
792
799
|
|
|
793
800
|
@PluginMethod
|
|
@@ -811,8 +818,8 @@ class ScanditBarcodeNative :
|
|
|
811
818
|
@PluginMethod
|
|
812
819
|
fun finishBarcodeCountViewListenerBrushForRecognizedBarcode(call: PluginCall) {
|
|
813
820
|
val brushJson = call.data.optString("brush", "")
|
|
814
|
-
val brush = if (brushJson.
|
|
815
|
-
val trackedBarcodeId = call.data.getInt("
|
|
821
|
+
val brush = if (brushJson.isNullOrBlank()) null else BrushDeserializer.fromJson(brushJson)
|
|
822
|
+
val trackedBarcodeId = call.data.getInt("trackedBarcodeId")
|
|
816
823
|
barcodeCountModule.finishBrushForRecognizedBarcodeEvent(brush, trackedBarcodeId)
|
|
817
824
|
call.resolve()
|
|
818
825
|
}
|
|
@@ -820,21 +827,38 @@ class ScanditBarcodeNative :
|
|
|
820
827
|
@PluginMethod
|
|
821
828
|
fun finishBarcodeCountViewListenerBrushForRecognizedBarcodeNotInList(call: PluginCall) {
|
|
822
829
|
val brushJson = call.data.optString("brush", "")
|
|
823
|
-
val brush = if (brushJson.
|
|
824
|
-
val trackedBarcodeId = call.data.getInt("
|
|
830
|
+
val brush = if (brushJson.isNullOrBlank()) null else BrushDeserializer.fromJson(brushJson)
|
|
831
|
+
val trackedBarcodeId = call.data.getInt("trackedBarcodeId")
|
|
825
832
|
barcodeCountModule.finishBrushForRecognizedBarcodeNotInListEvent(brush, trackedBarcodeId)
|
|
826
833
|
call.resolve()
|
|
827
834
|
}
|
|
828
835
|
|
|
829
836
|
@PluginMethod
|
|
830
|
-
fun
|
|
837
|
+
fun finishBarcodeCountViewListenerOnBrushForAcceptedBarcode(call: PluginCall) {
|
|
831
838
|
val brushJson = call.data.optString("brush", "")
|
|
832
|
-
val brush = if (brushJson.
|
|
833
|
-
val trackedBarcodeId = call.data.getInt("
|
|
834
|
-
barcodeCountModule.
|
|
839
|
+
val brush = if (brushJson.isNullOrBlank()) null else BrushDeserializer.fromJson(brushJson)
|
|
840
|
+
val trackedBarcodeId = call.data.getInt("trackedBarcodeId")
|
|
841
|
+
barcodeCountModule.finishBrushForAcceptedBarcodeEvent(brush, trackedBarcodeId)
|
|
835
842
|
call.resolve()
|
|
836
843
|
}
|
|
837
844
|
|
|
845
|
+
@PluginMethod
|
|
846
|
+
fun finishBarcodeCountViewListenerOnBrushForRejectedBarcode(call: PluginCall) {
|
|
847
|
+
val brushJson = call.data.optString("brush", "")
|
|
848
|
+
val brush = if (brushJson.isNullOrBlank()) null else BrushDeserializer.fromJson(brushJson)
|
|
849
|
+
val trackedBarcodeId = call.data.getInt("trackedBarcodeId")
|
|
850
|
+
barcodeCountModule.finishBrushForRejectedBarcodeEvent(brush, trackedBarcodeId)
|
|
851
|
+
call.resolve()
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
@PluginMethod
|
|
855
|
+
fun barcodeCountViewEnableHardwareTrigger(call: PluginCall) {
|
|
856
|
+
barcodeCountModule.enableHardwareTrigger(
|
|
857
|
+
call.data.getInteger("hardwareTriggerKeyCode"),
|
|
858
|
+
CapacitorResult(call)
|
|
859
|
+
)
|
|
860
|
+
}
|
|
861
|
+
|
|
838
862
|
//endregion
|
|
839
863
|
|
|
840
864
|
private fun getBitmapFromBase64EncodedViewData(baseEncodedViewData: String?): Bitmap? {
|
|
@@ -852,8 +876,11 @@ class ScanditBarcodeNative :
|
|
|
852
876
|
}
|
|
853
877
|
|
|
854
878
|
override fun emit(eventName: String, payload: MutableMap<String, Any?>) {
|
|
855
|
-
|
|
856
|
-
|
|
879
|
+
val capacitorPayload = JSObject()
|
|
880
|
+
capacitorPayload.put("name", eventName)
|
|
881
|
+
capacitorPayload.put("data", JSONObject(payload).toString())
|
|
882
|
+
|
|
883
|
+
notifyListeners(eventName, capacitorPayload)
|
|
857
884
|
}
|
|
858
885
|
|
|
859
886
|
override fun hasListenersForEvent(eventName: String): Boolean = this.hasListeners(eventName)
|
|
@@ -1055,6 +1082,13 @@ class ScanditBarcodeNative :
|
|
|
1055
1082
|
}
|
|
1056
1083
|
}
|
|
1057
1084
|
|
|
1085
|
+
@PluginMethod
|
|
1086
|
+
fun removePickView(call: PluginCall) {
|
|
1087
|
+
barcodePickModule.viewDisposed()
|
|
1088
|
+
barcodePickViewHandler.disposeCurrentView()
|
|
1089
|
+
call.resolve()
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1058
1092
|
@PluginMethod
|
|
1059
1093
|
fun updatePickView(call: PluginCall) {
|
|
1060
1094
|
val viewJson = call.data.toString()
|
|
@@ -69,7 +69,7 @@ class BarcodePickViewHandler (
|
|
|
69
69
|
disposeCurrentWebView()
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
fun disposeCurrentView() {
|
|
73
73
|
val view = barcodePickViewContainer ?: return
|
|
74
74
|
removeBarcodePickViewContainer(view)
|
|
75
75
|
}
|
|
@@ -136,4 +136,4 @@ class BarcodePickViewHandler (
|
|
|
136
136
|
barcodePickViewContainer.requestLayout()
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
}
|
|
139
|
+
}
|