export declare const formatValuePrecision: (value: any) => any; export declare const downloadPDF: (filename: any, pdfBlob: any) => void; /** * Unescape line break '\n' symbols. Summary and description of App may contain escaped * single '\\n' or multiple '\\n\\n...' line break symbols. * @param {String} - String to unescape * @return {String} - Unescaped string */ export declare const unescapeLineBreaks: (string?: string) => string; /** * Convert dataURL to Blob object. * @param dataURL {String} - dataURL string to convert * @returns {Blob} - result Blob object */ export declare const dataURLtoBlob: (dataURL: string) => Blob; /** * Timer for code banchmarks * @param {String} name - bame of timer * @return {Object} - object with timer stop method */ export declare const banchmarkTimer: (name: string) => Object; /** * Get percent value * @param {number} value - target value * @param {number} sum - base value * @return {number} - percentage */ export declare const convertToPercent: (value: number, sum: number) => number; /** * Parse number from string, if not number - returns 0 * @param {String} string - string that may contain number * @return {[type]} - parsed number or 0 */ export declare const parseNumberFromString: (string: string) => [type]; /** * Get lines friquency to get from CSV * Helps to get from 1000 to 9999 lines from CSV to preven complex calculations * @param {Number} linesAmount - lines amount in CSV * @return {Number} - fines frequency */ export declare const getLinesFrequency: (linesAmount: number) => number; /** * Gets average by each column in CSV * @param {String} csv - CSV * @return {Array} - first element is headers, second element is averages */ export declare const getAverageByColumnsForCSV: (csv: string) => any[]; /** * Transform given number to a color (RGB) * @param i * @returns {string} * @private */ export declare const intToRGB: (i: any) => string; /** * Transform given string to a hash code * @param str * @returns {number} * @private */ export declare const hashCode: (str: any) => number; /** * Transform given string to a color (RGB) * @param {string} str * @returns {string} */ export declare const getColorFromString: (str: string) => string; /** * Optimize event handler via throttling * @param obj - event emitter (must have addEventListener method) * @param type - event type * @param callback - event handler * @param ctx - context for event handler execution * @returns {function()} - unsubscribe function */ export declare const throttledEventListener: (obj: any, type: any, callback: any, ctx: any) => Function; /** * Get a snapshot for any DOM element on the page * @param elemId {string} - dom element id * @returns {string} - data URL for snapshot */ export declare const getSnapshotForElement: (elemId: string) => string; export declare const getAssetStatusColor: (status: any) => "#2196f3" | "#4caf50" | "#9e9e9e" | "#f44336" | "#ffeb3b"; /** * Finds closest to value in array of numbers * Source: https://stackoverflow.com/a/19277804/8337033 * @param {array} array - array to find closest to value * @param {number} value - value to which find closest in array * @return {number} - closest to value in array */ export declare const closest: (array: array, value: number) => number; export declare const mathMax: (a: any, b: any) => any; export declare const mathMin: (a: any, b: any) => any; /** * Gets operation by operation type * @param {number|null} operationType - operation type * @return {object|undefined} operation - operation */ export declare const getOperationByType: (operationType: number | null) => object | undefined; export declare const getUserFullName: (user: any) => string; export declare const getNameInitials: (name: any) => any; export declare const getS3BucketName: () => "corva-files" | "corva-files-qa"; export declare const getS3FileUrl: (bucket: any, fileName: any) => string; export declare const getFileNameWithExtensionFromPath: (path?: string) => string; export declare const hexToRgbA: (hex: any, alpha?: number) => string; export declare const truncateString: (str: any, limit: any) => any; /** * Copies text to clipboard * @param {string} text - text to copy * @return {undefined} */ export declare const copyToClipboard: (text: string) => undefined; declare const utils: { formatValuePrecision: typeof formatValuePrecision; downloadPDF: typeof downloadPDF; unescapeLineBreaks: typeof unescapeLineBreaks; dataURLtoBlob: typeof dataURLtoBlob; banchmarkTimer: typeof banchmarkTimer; convertToPercent: typeof convertToPercent; getAverageByColumnsForCSV: typeof getAverageByColumnsForCSV; getLinesFrequency: typeof getLinesFrequency; getColorFromString: typeof getColorFromString; intToRGB: typeof intToRGB; hashCode: typeof hashCode; throttledEventListener: typeof throttledEventListener; getSnapshotForElement: typeof getSnapshotForElement; getAssetStatusColor: typeof getAssetStatusColor; closest: typeof closest; mathMax: typeof mathMax; mathMin: typeof mathMin; getOperationByType: typeof getOperationByType; getUserFullName: typeof getUserFullName; getNameInitials: typeof getNameInitials; getS3BucketName: typeof getS3BucketName; getS3FileUrl: typeof getS3FileUrl; getFileNameWithExtensionFromPath: typeof getFileNameWithExtensionFromPath; hexToRgbA: typeof hexToRgbA; truncateString: typeof truncateString; copyToClipboard: typeof copyToClipboard; }; export default utils; //# sourceMappingURL=main.d.ts.map