@scandit/web-datacapture-barcode
Version:
Scandit Data Capture SDK for the Web
1 lines • 775 B
JavaScript
import{defaultSymbologies as e}from"../defaults/DefaultsSymbologies.js";var t=class{constructor(){this.properties={},this.symbologies={}}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>this.symbologies[e].isEnabled)}settingsForSymbology(t){if(!this.symbologies[t]){let n=e.SymbologySettings[t];n._symbology=t,this.symbologies[t]=n}return this.symbologies[t]}setProperty(e,t){this.properties[e]=t}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let t of e)this.enableSymbology(t,!0)}enableSymbology(e,t){this.settingsForSymbology(e).isEnabled=t}toJSONObject(){return{properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((e,t)=>(e[t]=this.symbologies[t].toJSONObject(),e),{})}}};export{t as BarcodeFindSettings};