import { NgZone } from '@angular/core'; import { OperatorFunction } from 'rxjs'; export declare function toInteger(value: any): number; export declare function toString(value: any): string; export declare function getValueInRange(value: number, max: number, min?: number): number; export declare function isString(value: any): value is string; export declare function isNumber(value: any): value is number; export declare function isInteger(value: any): value is number; export declare function isDefined(value: any): boolean; export declare function padNumber(value: number): string; export declare function regExpEscape(text: any): any; export declare function hasClassName(element: any, className: string): boolean; export declare function closest(element: HTMLElement, selector?: string): HTMLElement | null; /** * Force a browser reflow * @param element element where to apply the reflow */ export declare function reflow(element: HTMLElement): DOMRect; /** * Creates an observable where all callbacks are executed inside a given zone * * @param zone */ export declare function runInZone(zone: NgZone): OperatorFunction; export declare function removeAccents(str: string): string; /** * Returns the the last element in the array where predicate is true, and null * otherwise. * @param array The source array to search in * @param predicate find calls predicate once for each element of the array, in descending * order, until it finds one where predicate returns true. If such an element is found, * findLast immediately returns that element. Otherwise, findLast returns null. */ export declare function findLast(array: Array, predicate: (value: T, index: number, obj: T[]) => boolean): T; /** * Returns the the last element's index in the array where predicate is true, and null * otherwise. * @param array The source array to search in * @param predicate calls predicate once for each element of the array, in descending * order, until it finds one where predicate returns true. If such an element is found, * findLastIndex immediately returns that element's index. Otherwise, findLast returns -1. */ export declare function findLastIndex(array: Array, predicate: (value: T, index: number, obj: T[]) => boolean): number; /** * Gets the next focusable item in a list. It is expected that the items in the given list contain * a disabled property such that disabled items are skipped when calculating next focusable item. * @param currentIndex - Starting point from where to start checking * @param allItems - all items in list * @param delta - either 1 to get next item in positive direction or -1 to get next item in previous direction * @returns next item */ export declare function getNextItemInList(currentIndex: number, allItems: T[], delta: 1 | -1): T; /** * Gets the next focusable item's index in a list. It is expected that the items in the given list contain * a disabled property such that disabled items are skipped when calculating next focusable item. * @param currentIndex - Starting point from where to start checking * @param allItems - all items in list * @param delta - either 1 to get next item in positive direction or -1 to get next item in previous direction * @returns next focusable item's index */ export declare function getNextItemIndexInList(currentIndex: number, allItems: T[], delta: 1 | -1): number; /** * Coerces a value to an array of trimmed non-empty strings. * Any input that is not an array, `null` or `undefined` will be turned into a string * via `toString()` and subsequently split with the given separator. * `null` and `undefined` will result in an empty array. * This results in the following outcomes: * - `null` -> `[]` * - `[null]` -> `["null"]` * - `["a", "b ", " "]` -> `["a", "b"]` * - `[1, [2, 3]]` -> `["1", "2,3"]` * - `[{ a: 0 }]` -> `["[object Object]"]` * - `{ a: 0 }` -> `["[object", "Object]"]` * * Useful for defining CSS classes or table columns. * @param value the value to coerce into an array of strings * @param separator split-separator if value isn't an array */ export declare function coerceStringArray(value: any, separator?: string | RegExp): string[];