import { type DslDefinition, type FieldDslDefinition } from '@oinone/kunlun-dsl';
import { type ActiveRecord, type RuntimeModelField, type RuntimeRelationField } from '@oinone/kunlun-engine';
import { type StandardString } from '@oinone/kunlun-shared';
import { type OioTableViewState } from '@oinone/kunlun-vue-widget';
import { BaseElementWidget, BaseFieldWidget } from '../../basic';
import { TableWidget } from '../table/TableWidget';
import { QuickFillType, type TableFieldOption } from './type';
interface Failure {
    rowNumber: number;
    detailList: {
        field: string;
        code: string;
        msg: string;
    }[];
}
interface QuickFillResponse {
    values: string;
    failures?: Failure[];
}
interface QuickFillField {
    field: string;
    required?: boolean;
    validate?: boolean;
    labelFields?: string[];
}
export declare class QuickFillWidget extends BaseElementWidget {
    protected viewState: OioTableViewState | undefined;
    protected tableWidget: TableWidget | undefined;
    initialize(props: any): this;
    protected get showAddBtn(): boolean;
    protected get showQuickFill(): boolean;
    protected type: QuickFillType;
    onTypeChange(type: QuickFillType): void;
    get editableModelFields(): RuntimeModelField[];
    showModal: boolean;
    step: number;
    onStepChange(step: number): void;
    onToggleModal(show: boolean): void;
    /**
     * 确认提交,校验excel数据
     */
    onSure(headers: TableFieldOption[], rows: StandardString[][]): Promise<void>;
    protected setRowValue(rowValue: Record<string, StandardString>, relationObjects: Record<string, ActiveRecord>, fieldName: string, cell: string): void;
    /**
     * 继续提交
     */
    onSubmit(): void;
    protected get fillValueFieldMapping(): [string, string][];
    protected lastCells: Record<string, any> | undefined;
    /**
     * 将表格数据，填充到excel中
     */
    fillValueByDataSource(): {
        cells?: Record<string, unknown>;
        rowCount?: number;
    };
    fillFieldValue(field: RuntimeModelField, value: any): any;
    /**
     * 触发表格字段的校验
     */
    validateTableField(failures: Failure[]): void;
    protected submitData(rows: ActiveRecord[]): ActiveRecord[];
    /**
     * 修改o2m表格的值
     */
    updateO2MTableValue(data: ActiveRecord[]): void;
    /**
     * 获取复杂字段的显示值
     */
    handleRelationFieldLabel(field: RuntimeRelationField, value: any): any;
    /**
     * 调接口校验excel数据
     */
    validateExcelValue(headers: TableFieldOption[], values: Record<string, StandardString>[], keepValues: Record<string, StandardString>[]): Promise<QuickFillResponse>;
    protected findModelField(fields: QuickFillField[], data: string): {
        fieldWidget?: undefined;
        field?: undefined;
    } | {
        fieldWidget: BaseFieldWidget<unknown, RuntimeModelField, import("../..").BaseFieldProps<RuntimeModelField>> | undefined;
        field: RuntimeModelField | undefined;
    };
    protected findFieldWidget<W extends BaseFieldWidget>(data: string): W | undefined;
    /**
     * 创建表格
     */
    protected createTableWidget(fields: TableFieldOption[], data: ActiveRecord[]): void;
    protected collectionFieldDsl(dsl: DslDefinition, deep?: number): Record<string, FieldDslDefinition>;
}
export {};
