import { ActiveRecord, ActiveRecords, RuntimeAction, RuntimeFunctionDefinition } from '@oinone/kunlun-engine';
import { CallChaining, ReturnPromise } from '@oinone/kunlun-shared';
import { ActiveEditorContext, OioTableInstance, RowContext, TableEditorCloseTrigger, TableEditorMode, TableEditorTrigger } from '@oinone/kunlun-vue-ui';
import { UserPreferEventManager } from '../../service';
import { UserTablePrefer } from '../../typing';
import { TableRowEditMode } from '../../typing/action';
import { BaseElementListViewWidget, BaseElementListViewWidgetProps } from '../element';
import { BaseTableColumnWidget } from '../table-column';
import { FieldWidgetComponentFunction } from '../types';
interface ColumnWidgetEntity {
    widget: BaseTableColumnWidget;
    index: number;
}
export declare class BaseTableWidget<Props extends BaseElementListViewWidgetProps = BaseElementListViewWidgetProps> extends BaseElementListViewWidget<Props> {
    protected tableInstance: OioTableInstance | undefined;
    protected tableRowEditMode: TableRowEditMode | undefined;
    protected createMode: boolean | undefined;
    protected cachedEditActiveRecords: ActiveRecord | undefined;
    protected currentTriggerCreateAction: RuntimeAction | undefined;
    getTableInstance(): OioTableInstance | undefined;
    protected setTableInstance(tableInstance: OioTableInstance | undefined): void;
    protected getFieldWidgetComponent: FieldWidgetComponentFunction | undefined;
    reloadActiveRecords(records: ActiveRecords | undefined): void;
    protected reloadTableInstanceActiveRecords(): void;
    protected expandContext: Record<string, unknown> | undefined;
    initialize(props: Props): this;
    protected get height(): string | undefined;
    protected get minHeight(): string | undefined;
    protected get maxHeight(): string | undefined;
    protected get sortable(): boolean;
    /**
     * 启用行内编辑（对所有列均生效）
     * @protected
     */
    protected get editable(): boolean | undefined;
    /**
     * 过滤列的行内编辑
     * @param context 激活编辑模式上下文
     * @param columnWidget 列组件
     * @param index 索引
     * @protected
     */
    protected filterEditable(context: ActiveEditorContext, columnWidget: BaseTableColumnWidget, index: number): boolean;
    /**
     * 行内编辑触发方式
     * @protected
     */
    protected get editorTrigger(): TableEditorTrigger;
    /**
     * 行内编辑模式
     * @protected
     */
    protected get editorMode(): TableEditorMode;
    protected editRowCallChaining: CallChaining | undefined;
    protected editRow(type: unknown, data: unknown): Promise<void>;
    /**
     * 行内触发关闭触发方式
     * @protected
     */
    protected get editorCloseTrigger(): TableEditorCloseTrigger;
    protected get editorShowIcon(): boolean;
    protected lastedCurrentEditorContext: ActiveEditorContext | undefined;
    /**
     * 当前编辑模式上下文
     * @protected
     */
    protected get currentEditorContext(): ActiveEditorContext | undefined;
    /**
     * 激活编辑模式前的回调
     * @param context 激活编辑模式上下文
     * @protected
     * @return true 允许打开编辑模式; false 阻止打开编辑模式
     */
    protected activeEditorBefore(context: ActiveEditorContext): boolean;
    /**
     * 激活编辑模式回调
     * @param context 激活编辑模式上下文
     * @protected
     */
    protected activeEditor(context: ActiveEditorContext): ReturnPromise<void>;
    protected removeRecordFormDataSource(context: RowContext): Promise<void>;
    /**
     * 行编辑关闭前
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedBefore(context: RowContext): Promise<boolean>;
    /**
     * 行编辑关闭
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosed(context: RowContext | undefined): Promise<boolean>;
    /**
     * 行内编辑关闭时的数据验证
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedForValidator(context?: RowContext): Promise<boolean>;
    /**
     * 行内编辑关闭时的数据提交
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedForSubmit(context: RowContext): Promise<ActiveRecord | undefined>;
    protected updateSubviewFieldWidget(context: RowContext, data: ActiveRecord): void;
    protected createSubviewFieldWidget(context: RowContext, data: ActiveRecord): void;
    /**
     * 内置行内编辑数据提交
     * @param context
     * @protected
     */
    protected $rowEditorClosedForSubmit(context: RowContext): Promise<ActiveRecord>;
    protected get rowEditorCreateFun(): string | undefined;
    protected get rowEditorUpdateFun(): string | undefined;
    /**
     * 行内编辑关闭时的更新服务调用
     * @param context 行上下文
     * @param data 提交数据({@link BaseTableWidget#rowEditorClosedForSubmit}的返回结果)
     * @protected
     */
    protected rowEditorClosedForUpdate(context: RowContext, data: ActiveRecords): Promise<boolean>;
    protected $rowEditorClosedForUpdate(context: RowContext, data: ActiveRecord): Promise<boolean>;
    protected rowEditorClosedForCreate(context: RowContext, data: ActiveRecords): Promise<boolean>;
    protected $rowEditorClosedForCreate(context: RowContext, data: ActiveRecord): Promise<boolean>;
    protected executeRowEditorUpdate(functionDefinition: RuntimeFunctionDefinition, data: ActiveRecord): Promise<Record<string, unknown>>;
    protected refreshRowEditorUpdate(context: RowContext, data: ActiveRecord, res: unknown): void;
    /**
     * 行内编辑关闭时的后置处理
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedAfterProcess(context: RowContext): Promise<void>;
    protected updateActiveRecordByData(data: ActiveRecord): void;
    executeExpression<T>(activeRecord: ActiveRecord | undefined, expression: string, errorValue?: T): T | string | undefined;
    protected columnWidgetMap: Map<string, ColumnWidgetEntity>;
    protected fieldWidgetMounted(widget: BaseTableColumnWidget): void;
    protected fieldWidgetUnmounted(widget: BaseTableColumnWidget): void;
    getColumnWidgets(sort?: boolean): BaseTableColumnWidget[];
    protected userPreferEventManager: UserPreferEventManager | undefined;
    protected userPrefer?: UserTablePrefer;
    protected initUserPrefer(): void;
    /**
     *
     * @param userPrefer
     * @deprecated 兼容原有逻辑 使用UserPreferEventManager.INSTANCE.reload方法替换
     */
    reloadUserPrefer(userPrefer: UserTablePrefer): void;
    protected $reloadUserPrefer(userPrefer: Partial<UserTablePrefer>): void;
    protected $saveUserPrefer(userPrefer: Partial<UserTablePrefer>): Promise<void>;
    protected $$beforeMount(): void;
    protected $$mounted(): void;
    protected $$unmounted(): void;
}
export {};
