import { GroupValue } from "../Actions/component/Group/PopoverContent";
import { FilterItemProps, FilterType } from "../../filter/types";
import { ColumnSettingType, DataSourceGroupType, GallerySettingValueType, ModeType, SortType } from "../types";
export declare const getHash: (obj: any) => any;
export declare const calcFilterSort: ({ dataSource, filter, sort, columns }: any) => any;
/**
 * 合并列设置
 * @param defaultColumns 默认列设置
 * @param tableId 表ID
 * @returns 合并后的列设置
 */
export declare const mergeColumnSetting: ({ columns, tableId, currentViewMode, }: {
    columns: Record<string, any>[];
    tableId?: string | undefined;
    currentViewMode: ModeType;
}) => {
    isShow: boolean;
}[] | ({
    width: any;
    isShow: any;
    sortIndex: number;
} | {
    isShow: boolean;
    sortIndex: number;
})[];
/**
 * 对数据源进行排序
 * @param dataSource 数据源数组
 * @param sortObj 排序对象，包含排序的键、值和类型
 * @returns 排序后的数据源数组
 */
export declare const sortDataSource: (dataSource: Record<string, any>[], sortObj: {
    sortKey: string;
    sortValue: "asc" | "desc";
    sortType: "date" | "string" | "number";
}) => Record<string, any>[];
/**
 * 根据行键获取 ID
 * @param item 记录对象
 * @param rowKey 行键，可以是字符串或函数
 * @returns 返回 ID
 */
export declare const getIdByRowKey: (item: Record<string, any>, rowKey: string | ((params: any) => string)) => any;
/**
 * 根据分组条件对数据源进行分组
 * @param dataSource 数据源
 * @param group 分组条件
 * @param rowKey 行键生成函数或字符串
 * @returns 返回分组后的数据源
 */
export declare const groupDataSource: (dataSource: Record<string, any>[], group: GroupValue, rowKey: string | ((params: any) => string)) => Record<string, any>[];
declare type ViewSetting = {
    order_by: string;
    group_by: GroupValue;
    column_setting: Record<string, any>[];
    gallery_setting: GallerySettingValueType;
    filters: any;
    filter_setting: {
        quickFilter: FilterItemProps[];
        otherFilter: FilterItemProps[];
    };
};
/**
 * 本地存储的表格设置对象
 */
declare type TableSettingObjType = {
    view_mode: ModeType;
    currentSettingHash: string;
} & {
    [K in ModeType]: ViewSetting;
};
/**
 * 将表格设置保存到本地存储
 * @param tableId 表格id
 * @param tableSettingObj 表格设置对象
 */
export declare const setTableSettingToLocalStorage: ({ tableId, tableSettingObj, currentViewMode, currentSettingHash, }: {
    tableId: string;
    tableSettingObj: Partial<ViewSetting & {
        view_mode: ModeType;
    }>;
    currentViewMode: ModeType;
    currentSettingHash: string;
}) => void;
export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
/**
 * 从本地存储中获取表格设置, 全部配置
 * @param tableId 表格ID
 * @returns 表格设置对象
 */
export declare const getTableSettingFromLocalStorage: (tableId?: string) => Partial<TableSettingObjType>;
/**
 * 从LocalStorage读取表当前视图模式
 * @param tableId
 */
export declare const getCurrentViewModeFromLocalStorage: (tableId?: string) => ModeType | undefined;
/**
 * 根据视图模式获取配置
 * @param tableId
 * @param currentViewMode
 */
export declare const getTableSettingByCurrentViewMode: (tableId: string, currentViewMode: ModeType) => ViewSetting | undefined;
/**
 * 将表单值保存到本地存储中
 * @param tableId 表单ID
 * @param allValues 表单所有值
 * @param keys 存储的键名
 */
export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, currentViewMode, currentSettingHash, }: {
    tableId?: string | undefined;
    allValues?: Record<string, any> | undefined;
    keys?: string[] | undefined;
    currentViewMode: ModeType;
    currentSettingHash: string;
}) => void;
/**
 * 合并筛选设置
 * @param list 列表数据
 * @param quickFilterMaxLength 快速筛选最大长度
 * @param tableId 表ID
 * @returns 返回合并后的筛选设置
 */
export declare const mergeFilterSetting: ({ list, quickFilterMaxLength, tableId, sortButtonShow, currentViewMode, }: {
    list: FilterItemProps[];
    quickFilterMaxLength: number;
    tableId?: string | undefined;
    sortButtonShow: boolean;
    currentViewMode: ModeType;
}) => {
    quickFilter: FilterItemProps[];
    otherFilter: FilterItemProps[];
    notSortFilter: FilterItemProps[];
};
/**
 * 过滤数据源
 * @param dataSource 数据源
 * @param filters 过滤条件
 * @param filterLocalArr 本地过滤项
 * @returns 过滤后的数据源
 */
export declare const filterDataSource: (dataSource: Record<string, any>[], filters: Record<string, any>, filterLocalArr: FilterItemProps[]) => Record<string, any>[];
/**
 * 根据模式获取设置键数组
 * @param filter 筛选器
 * @param columnSetting 列设置
 * @param dataSourceGroup 数据源分组
 * @param sort 排序
 * @param mode 模式，可选值为 "localStorage" 或 "remote"
 * @returns 返回设置键数组
 */
export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourceGroup, sort, mode, currentViewMode, }: {
    filter?: FilterType | undefined;
    columnSetting?: ColumnSettingType | undefined;
    dataSourceGroup?: DataSourceGroupType | undefined;
    sort?: SortType | undefined;
    mode: "" | "localStorage" | "remote";
    currentViewMode: ModeType;
}) => ("filters" | "filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
export declare const stringify: (obj: Record<string, any>) => string;
export {};
