1 | import PropTypes from 'prop-types';
|
2 | import React from 'react';
|
3 | import { ViewProps } from 'react-native';
|
4 | declare type BarCodeEvent = {
|
5 | type: string;
|
6 | data: string;
|
7 | [key: string]: any;
|
8 | };
|
9 | export declare type BarCodeEventCallbackArguments = {
|
10 | nativeEvent: BarCodeEvent;
|
11 | };
|
12 | export declare type BarCodeScannedCallback = (params: BarCodeEvent) => void;
|
13 | export interface BarCodeScannerProps extends ViewProps {
|
14 | type?: 'front' | 'back' | number;
|
15 | barCodeTypes?: string[];
|
16 | onBarCodeScanned: BarCodeScannedCallback;
|
17 | }
|
18 | export declare class BarCodeScanner extends React.Component<BarCodeScannerProps> {
|
19 | lastEvents: {
|
20 | [key: string]: any;
|
21 | };
|
22 | lastEventsTimes: {
|
23 | [key: string]: any;
|
24 | };
|
25 | static Constants: {
|
26 | BarCodeType: any;
|
27 | Type: any;
|
28 | };
|
29 | static ConversionTables: {
|
30 | type: any;
|
31 | };
|
32 | static propTypes: {
|
33 | onBarCodeScanned: PropTypes.Requireable<(...args: any[]) => any>;
|
34 | barCodeTypes: PropTypes.Requireable<any[]>;
|
35 | type: PropTypes.Requireable<React.ReactText>;
|
36 | hitSlop?: PropTypes.Validator<import("react-native").Insets | undefined> | undefined;
|
37 | onLayout?: PropTypes.Validator<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
38 | pointerEvents?: PropTypes.Validator<"box-none" | "none" | "box-only" | "auto" | undefined> | undefined;
|
39 | removeClippedSubviews?: PropTypes.Validator<boolean | undefined> | undefined;
|
40 | style?: PropTypes.Validator<import("react-native").StyleProp<import("react-native").ViewStyle>> | undefined;
|
41 | testID?: PropTypes.Validator<string | undefined> | undefined;
|
42 | nativeID?: PropTypes.Validator<string | undefined> | undefined;
|
43 | collapsable?: PropTypes.Validator<boolean | undefined> | undefined;
|
44 | needsOffscreenAlphaCompositing?: PropTypes.Validator<boolean | undefined> | undefined;
|
45 | renderToHardwareTextureAndroid?: PropTypes.Validator<boolean | undefined> | undefined;
|
46 | accessibilityViewIsModal?: PropTypes.Validator<boolean | undefined> | undefined;
|
47 | accessibilityActions?: PropTypes.Validator<string[] | undefined> | undefined;
|
48 | onAccessibilityAction?: PropTypes.Validator<(() => void) | undefined> | undefined;
|
49 | shouldRasterizeIOS?: PropTypes.Validator<boolean | undefined> | undefined;
|
50 | isTVSelectable?: PropTypes.Validator<boolean | undefined> | undefined;
|
51 | hasTVPreferredFocus?: PropTypes.Validator<boolean | undefined> | undefined;
|
52 | tvParallaxProperties?: PropTypes.Validator<import("react-native").TVParallaxProperties | undefined> | undefined;
|
53 | tvParallaxShiftDistanceX?: PropTypes.Validator<number | undefined> | undefined;
|
54 | tvParallaxShiftDistanceY?: PropTypes.Validator<number | undefined> | undefined;
|
55 | tvParallaxTiltAngle?: PropTypes.Validator<number | undefined> | undefined;
|
56 | tvParallaxMagnification?: PropTypes.Validator<number | undefined> | undefined;
|
57 | onStartShouldSetResponder?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
|
58 | onMoveShouldSetResponder?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
|
59 | onResponderEnd?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
60 | onResponderGrant?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
61 | onResponderReject?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
62 | onResponderMove?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
63 | onResponderRelease?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
64 | onResponderStart?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
65 | onResponderTerminationRequest?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
|
66 | onResponderTerminate?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
67 | onStartShouldSetResponderCapture?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
|
68 | onMoveShouldSetResponderCapture?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
|
69 | onTouchStart?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
70 | onTouchMove?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
71 | onTouchEnd?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
72 | onTouchCancel?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
73 | onTouchEndCapture?: PropTypes.Validator<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
74 | accessible?: PropTypes.Validator<boolean | undefined> | undefined;
|
75 | accessibilityLabel?: PropTypes.Validator<string | undefined> | undefined;
|
76 | accessibilityRole?: PropTypes.Validator<"none" | "button" | "link" | "search" | "image" | "keyboardkey" | "text" | "adjustable" | "imagebutton" | "header" | "summary" | "alert" | "checkbox" | "combobox" | "menu" | "menubar" | "menuitem" | "progressbar" | "radio" | "radiogroup" | "scrollbar" | "spinbutton" | "switch" | "tab" | "tablist" | "timer" | "toolbar" | undefined> | undefined;
|
77 | accessibilityStates?: PropTypes.Validator<import("react-native").AccessibilityStates[] | undefined> | undefined;
|
78 | accessibilityState?: PropTypes.Validator<import("react-native").AccessibilityState | undefined> | undefined;
|
79 | accessibilityHint?: PropTypes.Validator<string | undefined> | undefined;
|
80 | accessibilityComponentType?: PropTypes.Validator<"none" | "button" | "radiobutton_checked" | "radiobutton_unchecked" | undefined> | undefined;
|
81 | accessibilityLiveRegion?: PropTypes.Validator<"none" | "polite" | "assertive" | undefined> | undefined;
|
82 | importantForAccessibility?: PropTypes.Validator<"auto" | "yes" | "no" | "no-hide-descendants" | undefined> | undefined;
|
83 | accessibilityElementsHidden?: PropTypes.Validator<boolean | undefined> | undefined;
|
84 | accessibilityTraits?: PropTypes.Validator<"none" | "button" | "link" | "search" | "image" | "text" | "adjustable" | "header" | "summary" | "disabled" | "selected" | "plays" | "key" | "frequentUpdates" | "startsMedia" | "allowsDirectInteraction" | "pageTurn" | import("react-native").AccessibilityTrait[] | undefined> | undefined;
|
85 | onAccessibilityTap?: PropTypes.Validator<(() => void) | undefined> | undefined;
|
86 | onMagicTap?: PropTypes.Validator<(() => void) | undefined> | undefined;
|
87 | accessibilityIgnoresInvertColors?: PropTypes.Validator<boolean | undefined> | undefined;
|
88 | };
|
89 | static defaultProps: {
|
90 | type: any;
|
91 | barCodeTypes: unknown[];
|
92 | };
|
93 | static scanFromURLAsync(url: string, barCodeTypes?: string[]): Promise<{
|
94 | type: string;
|
95 | data: string;
|
96 | }>;
|
97 | render(): JSX.Element;
|
98 | onObjectDetected: (callback?: BarCodeScannedCallback | undefined) => ({ nativeEvent, }: BarCodeEventCallbackArguments) => void;
|
99 | convertNativeProps(props: BarCodeScannerProps): {
|
100 | type?: any;
|
101 | barCodeTypes?: any;
|
102 | onBarCodeScanned: any;
|
103 | hitSlop?: any;
|
104 | onLayout?: any;
|
105 | pointerEvents?: any;
|
106 | removeClippedSubviews?: any;
|
107 | style?: any;
|
108 | testID?: any;
|
109 | nativeID?: any;
|
110 | collapsable?: any;
|
111 | needsOffscreenAlphaCompositing?: any;
|
112 | renderToHardwareTextureAndroid?: any;
|
113 | accessibilityViewIsModal?: any;
|
114 | accessibilityActions?: any;
|
115 | onAccessibilityAction?: any;
|
116 | shouldRasterizeIOS?: any;
|
117 | isTVSelectable?: any;
|
118 | hasTVPreferredFocus?: any;
|
119 | tvParallaxProperties?: any;
|
120 | tvParallaxShiftDistanceX?: any;
|
121 | tvParallaxShiftDistanceY?: any;
|
122 | tvParallaxTiltAngle?: any;
|
123 | tvParallaxMagnification?: any;
|
124 | onStartShouldSetResponder?: any;
|
125 | onMoveShouldSetResponder?: any;
|
126 | onResponderEnd?: any;
|
127 | onResponderGrant?: any;
|
128 | onResponderReject?: any;
|
129 | onResponderMove?: any;
|
130 | onResponderRelease?: any;
|
131 | onResponderStart?: any;
|
132 | onResponderTerminationRequest?: any;
|
133 | onResponderTerminate?: any;
|
134 | onStartShouldSetResponderCapture?: any;
|
135 | onMoveShouldSetResponderCapture?: any;
|
136 | onTouchStart?: any;
|
137 | onTouchMove?: any;
|
138 | onTouchEnd?: any;
|
139 | onTouchCancel?: any;
|
140 | onTouchEndCapture?: any;
|
141 | accessible?: any;
|
142 | accessibilityLabel?: any;
|
143 | accessibilityRole?: any;
|
144 | accessibilityStates?: any;
|
145 | accessibilityState?: any;
|
146 | accessibilityHint?: any;
|
147 | accessibilityComponentType?: any;
|
148 | accessibilityLiveRegion?: any;
|
149 | importantForAccessibility?: any;
|
150 | accessibilityElementsHidden?: any;
|
151 | accessibilityTraits?: any;
|
152 | onAccessibilityTap?: any;
|
153 | onMagicTap?: any;
|
154 | accessibilityIgnoresInvertColors?: any;
|
155 | };
|
156 | convertProp(value: any, key: string): any;
|
157 | }
|
158 | export declare const Constants: {
|
159 | BarCodeType: any;
|
160 | Type: any;
|
161 | };
|
162 | export {};
|