import { IUser } from '../1properties/0define/1comp/user';
import { IResult } from './http';
export default class ComUtil {
    static isString(msg: any): boolean;
    static isUndefined(msg: any): boolean;
    static isFunction(msg: any): boolean;
    static isArray(msg: any): boolean;
    /**
     * 检测是为空,当传递的是数字类型,且为0的时候,判定不为空
     * @param msg 需要判定的对象
     */
    static isEmpty(msg: any): boolean;
    static isNotEmpty(msg: any): boolean;
    static isObject(msg: any): boolean;
    static isNumber(msg: any): boolean;
    static forEach(msg: any, call: (value: any, key: any) => void): void;
    static deepCopy(target: any): any;
    static changeToOption(cell: Array<any>, labelK: string, valueK?: string): any[];
    static mapToOptionList(target: any): {
        value: string;
        label: any;
    }[];
    static changeToTree(item: Array<any>): any[];
    /**
     *
     * @param {需要构建树节点的list} item
     * @param {对元素进行扩展} extendItemCall
     * @param {过滤节点的函数} filter
     */
    static changeToTreeDo(item: Array<any>, extendItemCall?: (it: any) => void, filter?: (ti: any) => boolean): any[];
    static stringifyJson(obj: any): string;
    static parseJson(obj: any): any;
    /**
     * 将字符串转换为对象
     * @param objString 对象绘制字符串
     * @returns
     */
    static dynamicEval(objString: any): any;
    /**
     *
     * @param {目标对象} target
     * @param {需要传递的KEY} keyList
     */
    static getMapValue(target: any, keyList: Iterable<string>): any;
    /**
     *
     * @param target 需要获取值的对象
     * @param keystring 键的层次, 如 a , a.b ,a.b.c
     * @param defaultV 未获取到后的默认值
     */
    static getDefaultValue(target: any, keystring: string, defaultV: any): any;
    /**
     * 获取字段显示的真实宽度
     * @param label1 字段名
     */
    static getLabelWidth(label1: string): number;
    static promiseOk(query: Promise<IResult>, showError?: boolean): Promise<IResult>;
    static promiseOkAll(query: Promise<IResult>[], showError?: boolean): Promise<IResult[]>;
    static uuid(): string;
    static sortList(sortKey: string, fromSmallToMax?: boolean, mySort?: (two?: any, one?: any) => number): (two: any, one: any) => number;
    static getUser(): IUser;
    static getToken(): string;
    static getTokenStr(): string;
    static getCompanyId(): string;
    static get(obj: any, key: any): any;
    static listToMap(list: any[], idKey: string | Function, data?: string | Function, filter?: Function): {};
    /**
     * 设置空的promise
     * @param data promise 默认返回
     */
    static promiseEmpty(data: any): Promise<IResult>;
    static ifTrueCall(condition: any, call: any): void;
    /**
     *
     * @param parent 父节点
     * @param id 组件
     * @param level 层级深度
     */
    static getComponentById(parent: any, id: string, level?: number): null;
    static valueIsTrueOrIntOne(value: any): boolean;
    /**
     * 获取缓存
     * @param key :字符串
     * @param isLocal :是否为local
     * @returns
     */
    static getStorage(key: string, isJson?: boolean, isLocal?: boolean): any;
    /**
     * 删除本地缓存
     * @param key :本地key
     * @returns
     */
    static removeStorage(key: string): void;
    /**
     *
     * @param key :字符串
     * @param value :存储值
     * @param isLocal :是否为local
     * @returns
     */
    static setStorage(key: string, value: any, isJson?: boolean, isLocal?: boolean): void;
}
