///
import React from 'react';
import { IScopedContext, RendererEvent } from 'fabos-amis-core';
import { RendererProps } from 'fabos-amis-core';
import { SchemaNode, ActionObject } from 'fabos-amis-core';
import { SpinnerExtraProps } from 'fabos-amis-ui';
import { IModalStore } from 'fabos-amis-core';
import { BaseSchema, SchemaClassName, SchemaCollection, SchemaName } from '../Schema';
import { ActionSchema } from './Action';
/**
* Dialog 弹框渲染器。
* 文档:https://aisuda.bce.baidu.com/amis/zh-CN/components/dialog
*/
export interface DialogSchema extends BaseSchema {
type: 'dialog';
/**
* 弹窗参数说明,值格式为 JSONSchema。
*/
inputParams?: any;
/**
* 默认不用填写,自动会创建确认和取消按钮。
*/
actions?: Array;
/**
* 内容区域
*/
body?: SchemaCollection;
/**
* 配置 Body 容器 className
*/
bodyClassName?: SchemaClassName;
/**
* 是否支持按 ESC 关闭 Dialog
*/
closeOnEsc?: boolean;
/**
* 是否支持点其它区域关闭 Dialog
*/
closeOnOutside?: boolean;
name?: SchemaName;
/**
* Dialog 大小
*/
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
/**
* Dialog 高度
*/
height?: string;
/**
* Dialog 宽度
*/
width?: string;
/**
* 请通过配置 title 设置标题
*/
title?: SchemaCollection;
header?: SchemaCollection;
headerClassName?: SchemaClassName;
footer?: SchemaCollection;
/**
* 影响自动生成的按钮,如果自己配置了按钮这个配置无效。
*/
confirm?: boolean;
/**
* 是否显示关闭按钮
*/
showCloseButton?: boolean;
/**
* 是否显示错误信息
*/
showErrorMsg?: boolean;
/**
* 是否显示 spinner
*/
showLoading?: boolean;
/**
* 是否显示蒙层
*/
overlay?: boolean;
/**
* 弹框类型 confirm 确认弹框
*/
dialogType?: 'confirm';
/**
* 可拖拽
*/
draggable?: boolean;
/**
* 数据映射
*/
data?: {
[propName: string]: any;
};
}
export type DialogSchemaBase = Omit;
export interface DialogProps extends RendererProps, Omit, SpinnerExtraProps {
onClose: (confirmed?: boolean) => void;
onConfirm: (values: Array