type ValueType = string | number;
interface IPreData {
    [key: string]: {
        name: string;
        value: ValueType;
    };
}
/**
 * 判断数组是否全部相等
 * @param {Array<number | string>} list - 数组
 * @returns {Boolean} 是否全部相等
 *
 * @example
 * isListAllEqual([0, 0, 0])
 *
 * // true
 *
 * isListAllEqual([0, 0, 2])
 *
 * // false
 */
export declare function isListAllEqual(list?: Array<number | string>): boolean;
/**
 * 获取对象的value列表，并输出大对象形式
 * @param {Array<any>} data
 * @returns {Object} 处理后的对象
 *
 * @example
 *
 * const data = [
 * {
 *   Project: 'x',
 *   Request: 1,
 *   Score: 'a'
 * },
 * {
 *   Project: 'y',
 *   Request: 2,
 *   Score: 'b'
 * }]
 *
 * getKeyValuesMap(data)
 *
 * // 结果为:
 * {
 *   Project: ['x', 'y'],
 *   Request: [1, 2],
 *   Score: ['a', 'b'],
 * }
 *
 * // 也支持参数为带value属性的对象数组，如：
 *
 * const data = [
 * {
 *   Project: {
 *     value: 'x'
 *   }
 * },{
 *   Project: {
 *     value: 'y'
 *   }
 * }]
 *
 * // 结果为：
 * {
 *   Project: ['x', 'y']
 * }
 */
export declare function getKeyValuesMap(data?: Array<{
    [k: string]: ValueType | {
        value: ValueType;
    };
}>): Record<string, Array<ValueType>>;
/**
 * 获取相对上次的比例，会给输入的对象数组的每一项增加 ratio、previousValue 属性
 * @param {Array<Object>} data - 输入数据
 * @param {Object} preDataMap - 上次数据的map
 * @param {string} uniqKey - 唯一键
 *
 * @example
 * const data = [{
 *   Project: { value: 'mj-match', name: 'Project' },
 *   Request: {
 *     value: 854,
 *     name: 'Request',
 *     idx: 19,
 *     lastIdx: 19,
 *     isMax: false,
 *     isMin: false,
 *     isSecondMax: false,
 *     isSecondMin: true,
 *   },
 * }];
 *
 * const preDataMap = {
 *   'mj-match': {
 *     Project: 'mj-match',
 *     Request: 4,
 *     Score: 91.81,
 *     FirstLoadTime: 178,
 *     WholePageTime: 1035,
 *     ParseDomTime: 484,
 *     DNSLinkTime: 0,
 *     DOMTime: 414,
 *     TCP: 0,
 *     HTTP: 275,
 *     BackEnd: 60,
 *     CGIFailNum: 0,
 *     ErrorLogNum: 0,
 *     CGIRequestNum: 83,
 *   },
 * };
 *
 * getPreviousRatio(data, preDataMap);
 *
 * // data会变成：
 * [{
 *   Project: { value: 'mj-match', name: 'Project' },
 *   Request: {
 *     value: 854,
 *     name: 'Request',
 *     idx: 19,
 *     lastIdx: 19,
 *     isMax: false,
 *     isMin: false,
 *     isSecondMax: false,
 *     isSecondMin: true,
 *
 *     previousValue: 4, // 新增属性
 *     ratio: "+999+%" // 新增属性
 *   },
 * }];
 */
export declare function getPreviousRatio(data?: Array<any>, preDataMap?: Record<string, any>, uniqKey?: string): void;
/**
 * 给对象数组的每一项，添加isMax、isMin、、isSecondMax、isSecondMin、idx、lastIdx等属性
 * @param {Array<object>} data 原始数据
 * @param {Array<string>} reverseScoreKeys - 逆序的key列表
 * @returns {Object} 处理后的数据
 *
 * @example
 * const data = [{
 *   ProjectName: { name: 'ProjectName', value: '麻将赛事' },
 *   PagePv: { name: 'PagePv', value: 2877 },
 * }, {
 *   ProjectName: { name: 'ProjectName', value: '斗地主赛事' },
 *   PagePv: { name: 'PagePv', value: 7 },
 * },
 * // ...
 * ];
 *
 * getMaxAndMinIdx(data, [])
 *
 * // =>
 *   [{
 *     ProjectName: { name: 'ProjectName', value: '麻将赛事' },
 *     PagePv: {
 *       name: 'PagePv',
 *       value: 2877,
 *       idx: 6,
 *       lastIdx: 6,
 *       isMax: false,
 *       isMin: false,
 *       isSecondMax: false,
 *       isSecondMin: false,
 *     },
 *   }];
 *
 */
export declare function getMaxAndMinIdx(data?: Array<Record<string, any>>, reverseScoreKeys?: Array<string>): any[];
/**
 * 拉平之前数据
 * @param {Array<Object>} preDataList 之前的数据，作为对照
 * @param {string} key 主键
 * @returns {Object} preDataMap
 *
 * @example
 * const data = [{
 *   ProjectName: { name: 'ProjectName', value: '研发平台' },
 *   PagePv: { name: 'PagePv', value: 152 },
 *   PageUv: { name: 'PageUv', value: 7 },
 *   Score: { name: 'Score', value: 93.92 },
 *   PageDuration: { name: 'PageDuration', value: 1281.58 },
 *   PageError: { name: 'PageError', value: 2 },
 * }];
 *
 * flattenPreData(data, 'ProjectName');
 *
 * // 输出
 * {
 *   研发平台: {
 *     ProjectName: '研发平台',
 *     PagePv: 152,
 *     PageUv: 7,
 *     Score: 93.92,
 *     PageDuration: 1281.58,
 *     PageError: 2,
 *   },
 * };
 */
export declare function flattenPreData(preDataList: Array<IPreData>, key: string): {
    [valueOfPrimaryKey: string]: {
        [key: string]: ValueType;
    };
};
/**
 * 对比两个对象列表
 * @param {Array<object>} list 现在数据
 * @param {Array<object>} preList 参照数据
 * @param {string} key 唯一key名称
 * @returns {Array<object>} 对比结果，增加为list的每一项增加previousValue和ratio属性
 * @example
 * const list = [
 *   {
 *     ProjectName: { name: 'ProjectName', value: '脚手架' },
 *     PagePv: { name: 'PagePv', value: 544343 },
 *     PageUv: { name: 'PageUv', value: 225275 },
 *   }
 * ]
 *
 * const preList = [
 *   {
 *     ProjectName: { name: 'ProjectName', value: '脚手架' },
 *     PagePv: { name: 'PagePv', value: 123123 },
 *     PageUv: { name: 'PageUv', value: 33333 },
 *   }
 * ]
 *
 * compareTwoList(list, preList, 'ProjectName')
 *
 * console.log(list)
 *
 * [
 *   {
 *     ProjectName: { name: 'ProjectName', value: '脚手架' },
 *     PagePv: {
 *       name: 'PagePv',
 *       value: 544343,
 *       ratio: '+342.1%',
 *       previousValue: 123123
 *     },
 *     PageUv: {
 *       name: 'PageUv',
 *       value: 225275,
 *       ratio: '+575.8%',
 *       previousValue: 33333
 *     }
 *   }
 * ]
 */
export declare function compareTwoList(list: Array<IPreData>, preList: Array<IPreData>, key: string): IPreData[];
export {};
