react-native-urovo
Version:
React native bindings for urovo scanners
49 lines (44 loc) • 1.41 kB
JavaScript
;
import NativeUrovo, { OutputMode } from './NativeUrovo';
export let UROVO_EVENTS = /*#__PURE__*/function (UROVO_EVENTS) {
UROVO_EVENTS["ON_SCAN"] = "ON_SCAN";
return UROVO_EVENTS;
}({});
/**
* Opens the Urovo scanner.
* @returns A promise that resolves to `true` if the scanner was successfully opened| otherwise `false`.
*/
export function openScanner(mode = OutputMode.INTENT) {
return NativeUrovo?.openScanner(mode);
}
export function switchOutputMode(mode) {
return NativeUrovo?.switchOutputMode(mode);
}
export function getOutputMode() {
return NativeUrovo?.getOutputMode();
}
export function closeScanner() {
return NativeUrovo?.closeScanner();
}
export function enableAllSymbologies(enable = true) {
return NativeUrovo?.enableAllSymbologies(enable);
}
export function getParameters(ids) {
return NativeUrovo?.getParameters(ids);
}
export function resetScannerParameters() {
return NativeUrovo?.resetScannerParameters();
}
// export type SetParameterArg = number;
export function setParameter(params) {
return NativeUrovo?.setParameter(params);
}
export function enableSymbologies(symbologies, enable = true) {
return NativeUrovo?.enableSymbologies(symbologies, enable);
}
// export const {} = NativeUrovo?.getConstants() ?? {};
const Urovo = NativeUrovo;
export * from './types';
export * from './hooks';
export default Urovo;
//# sourceMappingURL=index.js.map