/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import { Form } from '@formily/core';
import { ChangeEvent } from 'react';
import { NavigateFunction } from 'react-router-dom';
import { CollectionOptions } from '../../collection-manager';
import { VariableOption, VariablesContextType } from '../../variables/types';
export * from './useBlockHeightProps';
export * from './useDataBlockParentRecord';
export * from './useFormActiveFields';
export * from './useParsedFilter';
export declare const usePickActionProps: () => {
    onClick(): void;
};
export declare function getFormValues({ filterByTk, field, form, fieldNames, getField, resource, actionFields, }: {
    filterByTk: any;
    field: any;
    form: any;
    fieldNames: any;
    getField: any;
    resource: any;
    actionFields: any[];
}): any;
export declare function useCollectValuesToSubmit(f?: Form): () => Promise<any>;
export declare const useCreateActionProps: () => {
    onClick(): Promise<void>;
};
export declare const useAssociationCreateActionProps: () => {
    onClick(): Promise<void>;
};
export interface FilterTarget {
    targets?: {
        /** field uid */
        uid: string;
        /** associated field */
        field?: string;
    }[];
    /**
     * 筛选表单区块的 uid
     */
    uid?: string;
}
export declare const findFilterTargets: (fieldSchema: any) => FilterTarget;
export declare const updateFilterTargets: (fieldSchema: any, targets: FilterTarget['targets']) => void;
export declare const useFilterBlockActionProps: () => {
    onClick(): Promise<void>;
};
export declare const useResetBlockActionProps: () => {
    onClick(): Promise<void>;
};
export declare const useCustomizeUpdateActionProps: () => {
    onClick(e?: any, callBack?: any): Promise<void>;
};
export declare const useCustomizeBulkUpdateActionProps: () => {
    onClick(): Promise<void>;
};
export declare const useCustomizeRequestActionProps: () => {
    onClick(): Promise<void>;
};
export declare const useUpdateActionProps: () => {
    onClick(e?: any, callBack?: any): Promise<void>;
};
export declare const useDestroyActionProps: () => {
    onClick(e?: any, callBack?: any): Promise<void>;
};
export declare const useRemoveActionProps: (associationName: any) => {
    onClick(value: any): Promise<void>;
};
export declare const useDisassociateActionProps: () => {
    onClick(e?: any, callBack?: any): Promise<void>;
};
export declare const useBulkDestroyActionProps: () => {
    onClick(e?: any, callBack?: any): Promise<void>;
};
export declare const useRefreshActionProps: () => {
    onClick(): Promise<void>;
};
export interface ColumnInfo {
    key: string;
    title: string;
    dataIndex: string;
    visible: boolean;
    fixed?: 'left' | 'right' | false;
    width?: number;
    order?: number;
}
/**
 * Get table columns from schema
 */
export declare const useTableColumns: () => ColumnInfo[];
export declare const useEditTableActionProps: () => {
    columns: (ColumnInfo | {
        visible: any;
        order: any;
        width: any;
        fixed: any;
        key: string;
        title: string;
        dataIndex: string;
    })[];
    onSubmit: (values: any) => void;
    onReset: () => void;
};
export declare const useDetailsPaginationProps: () => {
    simple: boolean;
    current: any;
    pageSize: number;
    showSizeChanger: boolean;
    align: string;
    onChange(page: any): Promise<void>;
    style: {
        marginTop: number;
        textAlign: string;
    };
    showTotal: boolean;
    showTitle: boolean;
    total: number;
    className: string;
    hidden?: undefined;
} | {
    simple: boolean;
    hidden: boolean;
    current: any;
    total: any;
    pageSize: number;
    showSizeChanger: boolean;
    align: string;
    onChange(page: any): Promise<void>;
    style: {
        marginTop: number;
        textAlign: string;
    };
    showTotal?: undefined;
    showTitle?: undefined;
    className?: undefined;
};
export declare const useAssociationFilterProps: () => {
    /** 渲染 Collapse 的列表数据 */
    list: {
        [key: string]: any;
    }[];
    onSelected: (value: any) => void;
    handleSearchInput: (e: ChangeEvent<any>) => void;
    params: any;
    run: (...params: any) => void;
};
export declare const useOptionalFieldList: () => import("../..").CollectionFieldOptions[];
export declare const useAssociationFilterBlockProps: () => {
    /** 渲染 Collapse 的列表数据 */
    list?: undefined;
    onSelected?: undefined;
    handleSearchInput?: undefined;
    params?: undefined;
    run?: undefined;
    valueKey?: undefined;
    labelKey?: undefined;
    dataScopeFilter?: undefined;
} | {
    /** 渲染 Collapse 的列表数据 */
    list: any;
    onSelected: (value: any) => void;
    handleSearchInput: any;
    params: any;
    run: any;
    valueKey: any;
    labelKey: any;
    dataScopeFilter: {};
};
export declare function getAssociationPath(str: any): any;
export declare const getAppends: ({ schema, prefix: defaultPrefix, updateAssociationValues, appends, getCollectionJoinField, getCollection, dataSource, }: {
    schema: any;
    prefix: string;
    updateAssociationValues: Set<string>;
    appends: Set<string>;
    getCollectionJoinField: (name: string, dataSource: string) => any;
    getCollection: (name: any, customDataSource?: string) => CollectionOptions;
    dataSource: string;
}) => void;
export declare const useAssociationNames: (dataSource?: string) => {
    getAssociationAppends: () => {
        appends: any;
        updateAssociationValues: any[];
    };
};
export declare function appendQueryStringToUrl(url: string, queryString: string): string;
export declare const useParseURLAndParams: () => {
    parseURLAndParams: (url: string, params: {
        name: string;
        value: any;
    }[]) => Promise<string>;
};
export declare function useLinkActionProps(componentProps?: any): {
    type: any;
    onClick(): Promise<void>;
};
export declare function replaceVariableValue(url: string, variables: VariablesContextType, localVariables: VariableOption[]): Promise<any>;
export declare function parseVariablesAndChangeParamsToQueryString({ searchParams, variables, localVariables, replaceVariableValue, }: {
    searchParams: {
        name: string;
        value: any;
    }[];
    variables: VariablesContextType;
    localVariables: VariableOption[];
    replaceVariableValue: (url: string, variables: VariablesContextType, localVariables: VariableOption[]) => Promise<any>;
}): Promise<string>;
/**
 * 1. 去除 value 是一个对象或者数组的 key
 * 2. 去除 value 是一个字符串长度超过 100 个字符的 key
 */
export declare function reduceValueSize(value: any): any;
export declare function completeURL(url: string, origin?: string): string;
export declare function navigateWithinSelf(link: string, navigate: NavigateFunction, basePath?: string): void;
/**
 * 为多层级的关系字段补充上父级字段
 * e.g. ['a', 'b.c'] => ['a', 'b', 'b.c']
 * @param appends
 * @returns
 */
export declare function fillParentFields(appends: Set<string>): Set<string>;
