UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

1 lines 1.3 kB
var e=class{constructor(e,t,n){this.trackingListenerSet=!1,this.coreEngine=e,this.Module=t,this.workerFunctions=n,this.setup()}barcodeBatchDidUpdateSession(e){this.workerFunctions.postMessage({type:`barcodeBatchDidUpdateSession`,payload:JSON.parse(e.toJson())})}getBatchDeserializer(){return this.barcodeBatchDeserializer}setup(){let e=this.Module.BarcodeBatchListener.extend(`BarcodeTrackingListener`,{didUpdateSession:(e,t,n)=>{this.barcodeBatchDidUpdateSession(t),e.delete(),t.delete(),n.delete()},onTrackedBarcodeTapped:(e,t)=>{this.onTrackedBarcodeTapped(t),e.delete(),t.delete()}}),t=this.Module.BarcodeBatchDeserializerListener.extend(`BarcodeTrackingDeserializerListener`,{onModeDeserializationFinished:(t,n,r)=>{this.trackingListenerSet||=(n.addListener(new e,1),!0),t.delete(),n.delete(),r.delete()},onModeDeserializationStarted(e,t,n){e.delete(),t.delete(),n.delete()},onSettingsDeserializationStarted(e,t,n){e.delete(),t.delete(),n.delete()},onSettingsDeserializationFinished(e,t,n){e.delete(),t.delete(),n.delete()}});this.barcodeBatchDeserializer=new this.Module.BarcodeBatchDeserializer,this.barcodeBatchDeserializer.setListener(new t)}onTrackedBarcodeTapped(e){this.workerFunctions.postMessage({type:`didTapTrackedBarcode`,payload:JSON.parse(e.toJson())})}};export{e as BarcodeBatchMode};