@widergy/web-utils
Version:
Utility GO! Web utils
48 lines (47 loc) • 2.4 kB
TypeScript
export declare const isFirefox: () => boolean;
export declare const isIE: () => boolean;
interface InterfaceOptions {
openOnTab: boolean;
seeSameTab: boolean;
}
interface Reference {
current: any;
}
export declare const retrieveWidth: () => number;
export declare const getURLParams: (search: string, ...paramsToRetrieve: Array<string>) => {
[key: string]: any;
};
export declare const isMobile: (mobileBreakpoint: number) => boolean;
export declare const isTablet: (mobileBreakpoint: number, tabletBreakpoint: number) => boolean;
export declare const isDesktop: (tabletBreakpoint: number) => boolean;
export declare const isDesktopHD: (tabletBreakpoint: number, hDBreakpoint: number) => boolean;
export declare const isBigScreen: (hDBreakpoint: number) => boolean;
export declare const isLandscape: () => boolean;
export declare const isPortrait: () => boolean;
export declare const RESIZE_EVENT = "resize";
export declare const downloadPDF: (content: string, fileName: string, options: InterfaceOptions, tabletBreakpoint: number) => void;
export declare const downloadAttachment: (url: string, name: string) => XMLHttpRequest;
export declare const decodeBase64: (base64: string) => string | null;
export declare const openBase64: (base64: string, contentType: string) => void;
export declare const isBottom: (ref: Reference, height: number) => boolean;
interface BrowserUtils {
isFirefox: () => boolean;
isIE: () => boolean;
getURLParams: (search: string, ...paramsToRetrieve: Array<string>) => object;
retrieveWidth: () => number;
isMobile: (mobileBreakpoint: number) => boolean;
isTablet: (mobileBreakpoint: number, tabletBreakpoint: number) => boolean;
isDesktop: (tabletBreakpoint: number) => boolean;
isDesktopHD: (tabletBreakpoint: number, hDBreakpoint: number) => boolean;
isBigScreen: (fullHDBreakpoint: number) => boolean;
isLandscape: () => boolean;
isPortrait: () => boolean;
isBottom: (ref: Reference, height: number) => boolean;
downloadPDF: (content: string, fileName: string, options: InterfaceOptions, tabletBreakpoint: number) => void;
downloadAttachment: (url: string, name: string) => void;
RESIZE_EVENT: string;
decodeBase64: (base64: string) => string | null;
openBase64: (base64: string, contentType: string) => void;
}
declare const BROWSER_UTILS: BrowserUtils;
export default BROWSER_UTILS;