-
Notifications
You must be signed in to change notification settings - Fork 156
/
index.d.ts
259 lines (188 loc) · 8.1 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// Type definitions for react-device-detect 2.0.0
// Project: https://github.com/duskload/react-device-detect
// Definitions by: Michael Laktionov <https://github.com/duskload>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
declare module "react-device-detect" {
export import BrowserView = ReactDeviceDetect.BrowserView;
export import MobileView = ReactDeviceDetect.MobileView;
export import AndroidView = ReactDeviceDetect.AndroidView;
export import IEView = ReactDeviceDetect.IEView;
export import IOSView = ReactDeviceDetect.IOSView;
export import TabletView = ReactDeviceDetect.TabletView;
export import WinPhoneView = ReactDeviceDetect.WinPhoneView;
export import MobileOnlyView = ReactDeviceDetect.MobileOnlyView;
export import SmartTVView = ReactDeviceDetect.SmartTVView;
export import ConsoleView = ReactDeviceDetect.ConsoleView;
export import WearableView = ReactDeviceDetect.WearableView;
export import CustomView = ReactDeviceDetect.CustomView;
export import CustomViewProps = ReactDeviceDetect.CustomViewProps;
export import ViewProps = ReactDeviceDetect.ViewProps;
export import isBrowser = ReactDeviceDetect.isBrowser;
export import isDesktop = ReactDeviceDetect.isDesktop;
export import isMobile = ReactDeviceDetect.isMobile;
export import isTablet = ReactDeviceDetect.isTablet;
export import isSmartTV = ReactDeviceDetect.isSmartTV;
export import isConsole = ReactDeviceDetect.isConsole;
export import isWearable = ReactDeviceDetect.isWearable;
export import isEmbedded = ReactDeviceDetect.isEmbedded;
export import isMobileSafari = ReactDeviceDetect.isMobileSafari;
export import isChromium = ReactDeviceDetect.isChromium;
export import isMobileOnly = ReactDeviceDetect.isMobileOnly;
export import isAndroid = ReactDeviceDetect.isAndroid;
export import isWinPhone = ReactDeviceDetect.isWinPhone;
export import isIOS = ReactDeviceDetect.isIOS;
export import isChrome = ReactDeviceDetect.isChrome;
export import isFirefox = ReactDeviceDetect.isFirefox;
export import isSafari = ReactDeviceDetect.isSafari;
export import isOpera = ReactDeviceDetect.isOpera;
export import isIE = ReactDeviceDetect.isIE;
export import isEdge = ReactDeviceDetect.isEdge;
export import isYandex = ReactDeviceDetect.isYandex;
export import osVersion = ReactDeviceDetect.osVersion;
export import osName = ReactDeviceDetect.osName;
export import fullBrowserVersion = ReactDeviceDetect.fullBrowserVersion;
export import browserVersion = ReactDeviceDetect.browserVersion;
export import browserName = ReactDeviceDetect.browserName;
export import mobileVendor = ReactDeviceDetect.mobileVendor;
export import mobileModel = ReactDeviceDetect.mobileModel;
export import engineName = ReactDeviceDetect.engineName;
export import engineVersion = ReactDeviceDetect.engineVersion;
export import getUA = ReactDeviceDetect.getUA;
export import deviceType = ReactDeviceDetect.deviceType;
export import deviceDetect = ReactDeviceDetect.deviceDetect;
export import isIOS13 = ReactDeviceDetect.isIOS13;
export import isIPad13 = ReactDeviceDetect.isIPad13;
export import isIPhone13 = ReactDeviceDetect.isIPhone13;
export import isIPod13 = ReactDeviceDetect.isIPod13;
export import isElectron = ReactDeviceDetect.isElectron;
export import isEdgeChromium = ReactDeviceDetect.isEdgeChromium;
export import isLegacyEdge = ReactDeviceDetect.isLegacyEdge;
export import isWindows = ReactDeviceDetect.isWindows;
export import isMacOs = ReactDeviceDetect.isMacOs;
export import withOrientationChange = ReactDeviceDetect.withOrientationChange;
export import isMIUI = ReactDeviceDetect.isMIUI;
export import isSamsungBrowser = ReactDeviceDetect.isSamsungBrowser;
export import OsTypes = ReactDeviceDetect.OsTypes;
export import BrowserTypes = ReactDeviceDetect.BrowserTypes;
export import parseUserAgent = ReactDeviceDetect.parseUserAgent;
export import setUserAgent = ReactDeviceDetect.setUserAgent;
export import getSelectorsByUserAgent = ReactDeviceDetect.getSelectorsByUserAgent;
export import useDeviceSelectors = ReactDeviceDetect.useDeviceSelectors;
export import useDeviceData = ReactDeviceDetect.useDeviceData;
export import useMobileOrientation = ReactDeviceDetect.useMobileOrientation;
}
declare namespace ReactDeviceDetect {
export interface ViewProps {
renderWithFragment?: boolean;
children?: React.ReactNode;
className?: string;
style?: React.CSSProperties;
}
export interface CustomViewProps {
renderWithFragment?: boolean;
children?: React.ReactNode;
className?: string;
style?: React.CSSProperties;
condition?: boolean;
}
interface IOsTypes {
IOS: string;
Android: string;
WindowsPhone: string;
Windows: string;
MAC_OS: string;
}
interface IBrowserTypes {
Chrome: string;
Firefox: string;
Opera: string;
Yandex: string;
Safari: string;
InternetExplorer: string;
Edge: string;
Chromium: string;
Ie: string;
MobileSafari: string;
EdgeChromium: string;
MIUI: string;
SamsungBrowser: string;
}
export function deviceDetect(userAgent: string | undefined): any;
export function parseUserAgent(userAgent: string | undefined): any;
export function setUserAgent(userAgent: string): any;
export function getSelectorsByUserAgent(userAgent: string): any;
export function useDeviceSelectors(userAgent: string): any;
export function useDeviceData(userAgent: string): any;
export function withOrientationChange<P, S = {}>(Component: React.Component<P, S> | React.FC<P>): React.ComponentClass<P, S>;
export function useMobileOrientation(): { isPortrait: boolean, isLandscape: boolean, orientation: 'portrait' | 'landscape' };
export class BrowserView extends React.Component<ViewProps> {
}
export class MobileView extends React.Component<ViewProps> {
}
export class AndroidView extends React.Component<ViewProps> {
}
export class IEView extends React.Component<ViewProps> {
}
export class IOSView extends React.Component<ViewProps> {
}
export class TabletView extends React.Component<ViewProps> {
}
export class WinPhoneView extends React.Component<ViewProps> {
}
export class MobileOnlyView extends React.Component<ViewProps> {
}
export class SmartTVView extends React.Component<ViewProps> {
}
export class ConsoleView extends React.Component<ViewProps> {
}
export class WearableView extends React.Component<ViewProps> {
}
export class CustomView extends React.Component<CustomViewProps> {
}
export const isBrowser: boolean;
export const isDesktop: boolean;
export const isMobile: boolean;
export const isTablet: boolean;
export const isSmartTV: boolean;
export const isConsole: boolean;
export const isWearable: boolean;
export const isEmbedded: boolean;
export const isMobileSafari: boolean;
export const isChromium: boolean;
export const isMobileOnly: boolean;
export const isAndroid: boolean;
export const isWinPhone: boolean;
export const isIOS: boolean;
export const isChrome: boolean;
export const isFirefox: boolean;
export const isSafari: boolean;
export const isOpera: boolean;
export const isIE: boolean;
export const isEdge: boolean;
export const isYandex: boolean;
export const osVersion: string;
export const osName: string;
export const fullBrowserVersion: string;
export const browserVersion: string;
export const browserName: string;
export const mobileVendor: string;
export const mobileModel: string;
export const engineName: string;
export const engineVersion: string;
export const getUA: string;
export const deviceType: string;
export const isIOS13: boolean;
export const isIPad13: boolean;
export const isIPhone13: boolean;
export const isIPod13: boolean;
export const isElectron: boolean;
export const isEdgeChromium: boolean;
export const isLegacyEdge: boolean;
export const isWindows: boolean;
export const isMacOs: boolean;
export const isMIUI: boolean;
export const isSamsungBrowser: boolean;
export const OsTypes: IOsTypes;
export const BrowserTypes: IBrowserTypes;
}