import { type DslDefinition } from '@oinone/kunlun-dsl';
import { type ActiveRecord, type ActiveRecords, type GroupingField, type RuntimeFunctionDefinition, type TableKeyboardConfig } from '@oinone/kunlun-engine';
import { type ISort } from '@oinone/kunlun-service';
import { type ReturnPromise } from '@oinone/kunlun-shared';
import { type ActiveEditorContext, type CheckedChangeEvent, type OioTableInstance, type RowContext, TableEditorCloseTrigger, TableEditorMode, TableEditorTrigger } from '@oinone/kunlun-vue-ui';
import { type OioAnyViewState } from '@oinone/kunlun-vue-widget';
import type { VxeTablePropTypes } from 'vxe-table';
import { type TableAddEvent, type TableCopyEvent, type TableEditEvent, type TableEventCallChaining } from '../../typing';
import { BaseElementListViewWidget, type BaseElementListViewWidgetProps } from '../element';
import { BaseTableColumnWidget } from '../table-column';
import type { FieldWidgetComponentFunction } from '../types';
interface ColumnWidgetEntity {
    widget: BaseTableColumnWidget;
    index: number;
}
export interface TableBindingKeyboardConfig {
    key: string;
    ctrl: boolean;
    shift: boolean;
    alt: boolean;
    fn: (e: KeyboardEvent) => void;
}
export declare class BaseTableWidget<Props extends BaseElementListViewWidgetProps = BaseElementListViewWidgetProps> extends BaseElementListViewWidget<Props> {
    protected tableInstance: OioTableInstance | undefined;
    getTableInstance(): OioTableInstance | undefined;
    protected setTableInstance(tableInstance: OioTableInstance | undefined): void;
    protected get tableConfig(): Record<string, any>;
    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(): NonNullable<boolean | undefined>;
    protected get enableViewControl(): boolean | undefined;
    /**
     * 视图控制组，包含所有子组件
     */
    get viewControlWidget(): DslDefinition | undefined;
    /**
     * 视图控制相关的子组件, 可能包含（排序、分组、行高切换、全屏）
     */
    protected get viewControlChildren(): DslDefinition[];
    /**
     * 启用切换行高
     * @protected
     */
    protected get switchLineHeight(): NonNullable<boolean | undefined>;
    protected get enabledFullScreen(): 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
     */
    protected get editorCloseTrigger(): TableEditorCloseTrigger;
    protected get editorShowIcon(): boolean;
    protected lastedCurrentEditorContext: ActiveEditorContext | undefined;
    /**
     * 当前编辑模式上下文
     * @protected
     */
    protected get currentEditorContext(): ActiveEditorContext | undefined;
    protected isNewRow(row?: ActiveRecord): boolean | undefined;
    /**
     * 激活编辑模式前的回调
     * @param context 激活编辑模式上下文
     * @protected
     * @return true 允许打开编辑模式; false 阻止打开编辑模式
     */
    protected activeEditorBefore(context: ActiveEditorContext): boolean;
    /**
     * Vxe-Table 事件不支持异步，使用关闭后置执行队列保证异步执行有序。
     * <br>在使用单元格级别的行内编辑时，切换单元格将快速执行 close -> active 事件
     * <br>async/await 将打乱执行顺序，导致 currentEditorContext 变量异常，上下文出现混乱
     * @protected
     */
    protected activeClosedAfterQueue: Function[] | undefined;
    /**
     * 激活编辑模式回调
     * @param context 激活编辑模式上下文
     * @protected
     */
    protected activeEditor(context: ActiveEditorContext): ReturnPromise<void>;
    protected updateLastedCurrentEditorContext(context: ActiveEditorContext): void;
    /**
     * 行编辑关闭前
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedBefore(context: RowContext): Promise<boolean>;
    /**
     * 行编辑关闭
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosed(context: RowContext | undefined): Promise<boolean>;
    protected $rowEditorClosed(context: RowContext | undefined): Promise<boolean>;
    protected $rowEditorComputeInvisibleColumns(context: RowContext): void;
    /**
     * 行内编辑关闭时的数据验证
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedForValidator(context?: RowContext): Promise<boolean>;
    protected get rowEditorSubmitAll(): NonNullable<boolean | undefined>;
    /**
     * 行内编辑关闭时的数据提交
     * @param context 行上下文
     * @protected
     */
    protected rowEditorClosedForSubmit(context: RowContext): Promise<ActiveRecord | undefined>;
    updateSubviewFieldWidget(context: RowContext, data: ActiveRecords): void;
    createSubviewFieldWidget(context: RowContext, data: ActiveRecords): 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;
    /**
     * 允许键盘快捷操作
     * @protected
     */
    protected get enabledKeyboard(): boolean;
    /**
     * 表格单元格快捷键编辑
     */
    protected get keyboardConfig(): TableKeyboardConfig;
    protected get defaultKeyboardConfig(): TableKeyboardConfig;
    protected get bindingKeyboardConfig(): Record<string, TableBindingKeyboardConfig[]>;
    protected matchKeyboardFunction(event: KeyboardEvent): ((e: KeyboardEvent) => void) | undefined;
    protected onKeyboardMoveToRightCell(event: KeyboardEvent): void;
    protected onKeyboardMoveToLeftCell(event: KeyboardEvent): void;
    protected onKeyboardMoveToDownCell(event: KeyboardEvent): void;
    protected onKeyboardMoveToUpCell(event: KeyboardEvent): void;
    protected onKeyboardEnter(event: KeyboardEvent): void;
    protected onKeyboardCancel(event: KeyboardEvent): void;
    protected internalSortConfig: VxeTablePropTypes.SortConfig;
    protected multipleFieldSort: boolean;
    protected get sortConfig(): VxeTablePropTypes.SortConfig;
    protected initSortConfig(): void;
    /**
     * 启用分组
     * @protected
     */
    protected get enableGrouping(): boolean;
    /**
     * 分组视图数据源的总数量
     */
    protected groupingExpandedAll: boolean | undefined;
    /**
     * 当前视图使用分组结构展示
     *  启动了分组并且有分组字段
     */
    protected get enabledGroupView(): boolean;
    /**
     * 分组视图底部展示「展开全部」操作
     */
    protected get groupViewFooterExpandControl(): boolean;
    /**
     * 分组视图底部展示「收起全部」操作
     */
    protected get groupViewFooterFoldControl(): boolean;
    /**
     * 分组参数
     * @protected
     */
    groupList: GroupingField[] | undefined;
    /**
     * 默认分组字段
     * @protected
     * @example "field00003,field00004"
     * @returns [field00003 desc,field00004 desc]
     */
    protected get grouping(): GroupingField[] | undefined;
    /**
     * 修改分组配置
     */
    onGroupChange(groupList: GroupingField[]): void;
    /**
     * 初始化分组字段列表，优选取url上面的配置，如果没有就取设计器配置
     */
    protected initGroupList(): void;
    protected tableEventCallChaining: TableEventCallChaining | undefined;
    protected onAddRowEvent(e?: Omit<TableAddEvent, 'type'>): Promise<void>;
    protected onCopyRowEvent(e: Omit<TableCopyEvent, 'type'>): Promise<void>;
    protected onEditRowEvent(e: Omit<TableEditEvent, 'type'>): void;
    executeExpression<T>(activeRecord: ActiveRecords | undefined, expression: string, errorValue?: T): T | string | undefined;
    /**
     * @deprecated
     */
    protected columnWidgetMap: Map<string, ColumnWidgetEntity>;
    /**
     * @deprecated
     */
    protected fieldWidgetMounted(widget: BaseTableColumnWidget): void;
    /**
     * @deprecated
     */
    protected fieldWidgetUnmounted(widget: BaseTableColumnWidget): void;
    /**
     * @deprecated
     */
    getColumnWidgets(sort?: boolean): BaseTableColumnWidget[];
    onCheckedChange(data: ActiveRecords, event?: CheckedChangeEvent): void;
    onCheckedAllChange(selected: boolean, data: ActiveRecord[], event?: CheckedChangeEvent): void;
    onSortChange(sortList: ISort[]): void;
    protected $$initViewState(state: OioAnyViewState): void;
    protected $$beforeMount(): void;
    protected $$mounted(): void;
    protected $$unmounted(): void;
}
export {};
