import { strings } from './constants'; import type { BaseEllipsis } from './foundation'; export declare function equalWith(value: any, other: any, customizer?: (...args: any[]) => boolean): boolean; export declare function getColumnKey(column: any, keyPropNames: any[]): any; /** * * @param {Array} arr * @param {number} [beginIndex] begin index, included * @param {number} [endIndex] end index, not included * @returns {number} */ export declare function arrayAdd(arr?: any[], beginIndex?: number, endIndex?: number): number; export declare function isLastLeftFixed(columns: Record[], column: Record, checkKeys?: string[]): boolean; export declare function isFirstFixedRight(columns: Record[], column: Record, checkKeys?: string[]): boolean; export declare function isAnyFixed(columns: Record[], fixedSet?: (string | boolean)[]): boolean; export declare function isAnyFixedRight(columns: Record[]): boolean; export declare function isFixedLeft(column: Record): boolean; export declare function isFixedRight(column: Record): boolean; export declare function isFixed(column: Record): boolean; export declare function isInnerColumnKey(key: string | number): boolean; export declare function isExpandedColumn(column: Record): boolean; export declare function isScrollbarColumn(column: Record): boolean; export declare function isSelectionColumn(column: Record): boolean; export declare function filterColumns(columns: Record[], ignoreKeys?: string[]): Record[]; /** * get width of scroll bar * @param {Array} columns * @returns {Number|undefined} */ export declare function getScrollbarColumnWidth(columns?: Record[]): any; export declare function getRecordKey(record: Record, rowKey: string | number | ((record: any) => string | number)): any; /** * Determine whether the expandedRowKeys includes a key (rowKey will be added to expandedRowKeys when the expand button is clicked) * @param {*} expandedRowKeys * @param {*} key */ export declare function isExpanded(expandedRowKeys: (string | number)[], key: string | number): boolean; /** * Determine whether the selectedKeysSet includes the key * @param {Set} selectedRowKeysSet * @param {String} key */ export declare function isSelected(selectedRowKeysSet: Set, key: string | number): boolean; /** * Whether the key is included in the disabledRowKeysSet * @param {Set} disabledRowKeysSet * @param {String} key */ export declare function isDisabled(disabledRowKeysSet: Set, key: string | number): boolean; export declare function getRecord(data: any[], recordKey: string | number, rowKey: string | number | ((record: any) => string | number)): any; export declare function getRecordChildren(record: Record, childrenRecordName: string): any; export declare function genExpandedRowKey(recordKey?: string, suffix?: string): string; export declare function getDefaultVirtualizedRowConfig(size?: string, sectionRow?: boolean): { height?: number; minHeight?: number; }; export declare function flattenColumns(cols: Record[], childrenColumnName?: string): Record[]; export declare function assignColumnKeys(columns: Record[], childrenColumnName?: string, level?: number): Record[]; export declare function sliceColumnsByLevel(columns: any[], targetLevel?: number, childrenColumnName?: string, currentLevel?: number): any[]; export declare function getColumnsByLevel(columns: Record[], targetLevel?: number, targetColumns?: Record[], currentLevel?: number, childrenColumnName?: string): Record[]; export declare function getAllLevelColumns(columns: Record[], childrenColumnName?: string): any[]; export declare function getColumnByLevelIndex(columns: Record[], index: number, level?: number, childrenColumnName?: string): any; export declare function findColumn(columns: Record[], column: Record, childrenColumnName?: string): any; export declare function expandBtnShouldInRow(props: ExpandBtnShouldInRowProps): boolean; export type ExpandBtnShouldInRowProps = { expandedRowRender: (record?: Record, index?: number, expanded?: boolean) => any; dataSource: Record[]; hideExpandedColumn: boolean; childrenRecordName: string; rowExpandable: (record?: Record) => boolean; }; /** * merge query * @param {*} query * @param {*} queries */ export declare function mergeQueries(query: Record, queries?: Record[]): Record[]; /** * Replace the width of the newColumns column with the width of the column after resize * @param {Object[]} columns columns retain the column width after resize * @param {Object[]} newColumns */ export declare function withResizeWidth(columns: Record[], newColumns: Record[]): Record[]; /** * Pure function version of the same function in table foundation * This is not accessible in getDerivedStateFromProps, so fork one out */ export declare function getAllDisabledRowKeys({ dataSource, getCheckboxProps, childrenRecordName, rowKey }: GetAllDisabledRowKeysProps): (string | number)[]; export interface GetAllDisabledRowKeysProps { dataSource: Record[]; getCheckboxProps: (record?: Record) => any; childrenRecordName?: string; rowKey?: string | number | ((record: Record) => string | number); } export declare function warnIfNoDataIndex(column: Record): void; /** * Whether is tree table */ export declare function isTreeTable({ dataSource, childrenRecordName }: { dataSource: Record; childrenRecordName?: string; }): boolean; export declare function getRTLAlign(align: typeof strings.ALIGNS[number], direction?: 'ltr' | 'rtl'): typeof strings.ALIGNS[number]; export declare function getRTLFlexAlign(align: typeof strings.ALIGNS[number], direction?: 'ltr' | 'rtl'): typeof strings.JUSTIFY_CONTENT[number]; export declare function shouldShowEllipsisTitle(ellipsis: BaseEllipsis): boolean;