import type React from 'react'; import type { TablePaginationConfig } from 'antd'; import type { SortOrder } from 'antd/es/table/interface'; import type { UseEditableUtilType } from 'ls-pro-utils'; import type { IntlType } from 'ls-pro-provider'; export { getUrlQuery, dateFormat, toGatewayUrl, getResourceProps } from 'ls-pro-common'; import type { ActionType, Bordered, BorderedType, ProColumns, UseFetchDataAction, PageInfo } from '../typing'; /** * 检查值是否存在 为了 避开 0 和 false * * @param value */ export declare const checkUndefinedOrNull: (value: any) => boolean; /** * 合并用户 props 和 预设的 props * * @param pagination * @param action * @param intl */ export declare function mergePagination(pagination: boolean | TablePaginationConfig | undefined, pageInfo: UseFetchDataAction['pageInfo'] & { setPageInfo: any; }, intl: IntlType): TablePaginationConfig | false | undefined; /** * 获取用户的 action 信息 * * @param actionRef * @param counter * @param onCleanSelected */ export declare function useActionType(ref: React.MutableRefObject, action: UseFetchDataAction, props: { fullScreen: () => void; onCleanSelected: () => void; onSelectedAll: () => void; onSelectedRows: (rows: any[]) => void; resetAll: () => void; editableUtils: UseEditableUtilType; showExport: () => void; showImport: () => void; getChanged: () => { insertRows: any[]; updateRows: any[]; deleteRows: any[]; }; getDatasource: () => any[]; setLocalData: (rows: any[]) => void; clearDataSource: () => void; setPageInfo: (pageInfo: PageInfo) => void; setFilter: (filter: any) => void; getFilter: () => any; selectRowAndScroll: (row: any | any[]) => void; getFilterRows: () => any[]; getColumnMap: () => any; getSort: () => any; setSort: (sort?: any) => void; rootRef: any; }): void; declare type PostDataType = (data: T) => T; /** * 一个转化的 pipeline 列表 * * @param data * @param pipeline */ export declare function postDataPipeline(data: T, pipeline: PostDataType[]): T; export declare const isBordered: (borderType: BorderedType, border?: Bordered | undefined) => boolean | undefined; export declare const isMergeCell: (dom: any) => any; /** * 根据 key 和 dataIndex 生成唯一 id * * @param key 用户设置的 key * @param dataIndex 在对象中的数据 * @param index 序列号,理论上唯一 */ export declare const genColumnKey: (key?: React.ReactText | undefined, index?: number | undefined) => string; /** * 从 ProColumns 数组中取出默认的排序和筛选数据 * * @param columns ProColumns */ export declare function parseDefaultColumnConfig(columns: ProColumns[]): { sort: Record; filter: Record; }; export declare type SortDataParams = { oldIndex: number; newIndex: number; }; /** * 数据排序核心逻辑 * * @param oldIndex 原始位置 * @param newIndex 新位置 * @param data 原始数组 */ export declare function sortData({ oldIndex, newIndex }: SortDataParams, data: T[]): T[] | null; /** * 比较两个对象是否相等 1. 属性个数一样且属性名相同 2. 属性值相同 * * @param obj1 * @param obj2 * @returns */ export declare const objectEq: (obj1: any, obj2: any) => boolean; /** * 获取当前用户当前模块的布局信息 * * @param param {resourceId: string, tableName: string, type: number} type:3-表格布局,4-查询布局 * @returns */ export declare const layoutGet: (param: any) => Promise; /** * 获取选中用户的布局信息 * * @param param {resourceId: string, tableName: string, type: number,userIds:string[]} type:3-表格布局,4-查询布局 * @returns */ export declare const layoutGetBatch: (param: any) => Promise; /** * 保存布局 * * @param param {resourceId: string, type: number, tableName: string, layout: string} */ export declare const layoutSave: (param: any) => Promise; /** * 删除布局 * * @param param {resourceId: string, type: number, tableName: string} */ export declare const layoutDelete: (param: any) => Promise; /** * 分享布局 * * @param param {type:layoutInfos:{userId:string,tableName:string,resourceId:string,layout:string}[] } * @returns */ export declare const layoutShare: (param: any) => Promise; /** * 分享用户清单 * * @returns */ export declare const layoutGetUsers: () => Promise; /** * 将对象转为字符串 * * @param o * @returns */ export declare const toStr: (o: any) => string; /** * 计算文本长度 * * @param text * @returns */ export declare const calcTextLength: (text: any) => number;