import { FormModule } from '@farris/devkit'; import { DgControlType } from '../../components/dg-control-type'; export declare class FormMetaDataContent { Id: string; Code: string; Name: string; Contents: { module: FormMetaDataModule; options?: FormOptions; }; } export declare class FormMetaDataContentForDB { Id: string; Code: string; Name: string; Contents: string; constructor(content: FormMetaDataContent); } export declare class FormMetadaDataDom { module: FormModule; } export declare class FormMetaDataModule { id: string; code: string; name: string; caption: string; type: string; creator: string; creationDate: Date; updateVersion: string; showTitle: boolean; boostrap: string; schemas: Array; states: Array; contents: Array; stateMachines: Array; viewmodels: Array; components: Array; webcmds: Array; serviceRefs: Array; ctrlLangs: any; isMobileApprove: boolean; isComposedFrm: boolean; projectName: string; extraImports: Array<{ name: string; path: string; }>; externalComponents: Array; declarations: FormDeclaration; subscriptions: Array; } export declare class FormOptions { enableTextArea: boolean; enableDragAndDropToModifyLayout: boolean; } /** * Component节点 */ export declare class FormComponent { id: string; type: string; viewModel: string; componentType: FormComponentType | any; contents: any[]; onInit: null; afterViewInit: null; } /** * 组件类型 */ export declare enum FormComponentType { /** * 表单 */ Frame = "Frame", /** * 列表/树表类 */ dataGrid = "dataGrid", /** * 列表视图 */ listView = "listView", /** * 卡片类(待优化,目前类型中带有控件列布局信息) */ form = "form", /** * 移动审批:人员信息组件 */ detailHeaderForMobileApprove = "detailHeaderForMobileApprove", /** * 移动审批:面板 */ panelForMobileApprove = "panelForMobileApprove", /** * 移动审批:流程图组件 */ flowProcessForMobileApprove = "flowProcessForMobileApprove" } /** * DOM 控件binding实体 */ export declare class FormBinding { type: FormBindingType; path: string; field: string; fullPath: string; } /** * binding 类型 */ export declare enum FormBindingType { Form = "Form", Variable = "Variable" } /** * dom Json ViewModel 节点实体 */ export declare class FormViewModel { id: string; code: string; name: string; fields: FormViewModelField[]; commands: any[]; states: FormVariable[]; serviceRefs: any[]; bindTo: string; parent?: string; enableUnifiedSession?: boolean; pagination?: FormViewModelPagination; } /** * dom Json ViewModel 节点中fields实体 */ export declare class FormViewModelField { type: string; id: string; fieldName: string; groupId: string; groupName: string; fieldSchema?: any; valueChanging?: string; valueChanged?: string; updateOn?: string; } /** * dom Json ViewModel 节点中states实体 */ export declare class FormVariable { id: string; code: string; name: string; value?: any; type: string; category: string; fields?: any[]; defaultValue?: any; } /** * 变量类型 */ export declare enum FormVariableCategory { locale = "locale", remote = "remote" } /** * 支持的变量类型 */ export declare const FormVariableTypes: { text: string; value: string; }[]; /** * DOM GridField 中的数据类型 */ export declare enum GridFieldDataType { string = "string", boolean = "boolean", date = "date", number = "number", enum = "enum", datetime = "datetime" } /** * 枚举类型 */ export declare class EnumData { value: string; name: string; } /** * Item类型数据 */ export declare class ItemData { value: string; name: string; } /** * vm 分页配置 */ export declare class FormViewModelPagination { enable: boolean; pageList?: string; pageSize?: number; } /** * 组合表单-声明实体 */ export declare class FormDeclaration { events?: DeclarationEvent[]; commands?: DeclarationCommand[]; states?: DeclartionState[]; } /** * 组合表单-事件声明实体 */ export declare class DeclarationEvent { hId?: string; /** 事件类型:控件的事件/实体的事件 */ type: 'controlEvent' | 'fieldEvent'; /** 编号 */ code: string; /** 名称 */ name: string; /** 事件 */ event: string; /** 路径 */ path: string; params: DeclarationParam[]; } /** * 组合表单-参数实体 */ export declare class DeclarationParam { hId?: string; /** 编号 */ code: string; /** 名称 */ name: string; /** 参数值 */ value: string; } /** * 组合表单-命令声明实体 */ export declare class DeclarationCommand { /** ID */ hId?: string; /** 命令编号 */ code: string; /** 命令名称 */ name: string; /** 命令 */ command: string; /** 路径 */ path: string; /** 命令所在的组件ID */ componentId: string; } /** * 组合表单-变量声明实体 */ export declare class DeclartionState { hId?: string; /** 编号 */ code: string; /** 名称 */ name: string; /** 变量 */ state: string; /** 变量路径 */ path: string; } /** * 组合表单-订阅实体 */ export declare class Subscription { /** 唯一标识 */ hId?: string; /** 源表单 */ sourceComponent: string; /** 原表单的事件编号 */ subscribeOn: string; /** 目标表单 */ targetComponent: string; /** 目标表单的命令编号 */ invoke: string; /** 目标表单的命令所在的组件ID */ invokeComponentId: string; /** 参数 */ paramMappings: SubscriptionParamMapping[]; } /** * 组合表单-订阅参数实体 */ export declare class SubscriptionParamMapping { /** 源参数编号 */ sourceCode: string; /** 目标参数编号 */ targetCode: string; /** 目标参数类型 */ targetType: string; /** 目标参数路径 */ targetPath: string; } /** * schema */ export declare class FormSchema { dataSource: string; sourceUri: string; id: string; code: string; name: string; entities: FormSchemaEntity[]; variables: FormSchemaEntityField[]; eapiId: string; extendProperties: { enableStdTimeFormat: boolean; }; } /** * 实体 */ export declare class FormSchemaEntity { id: string; code: string; name: string; label: string; type: FormSchemaEntityType; } /** * 实体类型对象 */ export declare class FormSchemaEntityType { name: string; primary: string; fields: FormSchemaEntityField[]; entities?: FormSchemaEntity[]; displayName?: string; } /** * 字段 */ export declare class FormSchemaEntityField { $type: FormSchemaEntityField$Type; id: string; originalId: string; code: string; label: string; bindingField: string; name: string; defaultValue: any; require: boolean; readonly: boolean; type: FormSchemaEntityFieldType; editor?: FormSchemaEntityFieldEditor; path?: string; bindingPath?: string; multiLanguage?: boolean; expression?: any; } /** * 字段类型对象 */ export declare class FormSchemaEntityFieldType { $type: FormSchemaEntityFieldType$Type; name: FormSchemaEntityFieldTypeName | any; length?: number; precision?: number; valueType?: FormSchemaEntityFieldType; enumValues?: EnumData[]; fields?: FormSchemaEntityField[]; displayName?: string; primary?: string; entities?: FormSchemaEntity[]; elementType?: any; extendProperty?: any; } /** * 字段编辑器对象 */ export declare class FormSchemaEntityFieldEditor { $type: DgControlType; [propName: string]: any; } /** * 字段类型枚举 */ export declare enum FormSchemaEntityField$Type { /** * 简单类型字段 */ SimpleField = "SimpleField", /** * 关联/UDT类型字段 */ ComplexField = "ComplexField" } /** * 字段类型对象中的类型枚举 */ export declare enum FormSchemaEntityFieldType$Type { /** * 字符串 */ StringType = "StringType", /** * 备注 */ TextType = "TextType", /** * 数字(整数、浮点数) */ NumericType = "NumericType", /** * 布尔 */ BooleanType = "BooleanType", /** * 日期 */ DateType = "DateType", /** * 日期时间 */ DateTimeType = "DateTimeType", /** * 枚举 */ EnumType = "EnumType", /** * 实体类 */ EntityType = "EntityType", /** * 分级码 */ HierarchyType = "HierarchyType", /** * 对象 */ ObjectType = "ObjectType", /** * 数字(大数据) */ BigNumericType = "BigNumericType" } /** * 字段类型中的名称 */ export declare enum FormSchemaEntityFieldTypeName { /** * 简单类型字段 */ String = "String", /** * 日期时间 */ DateTime = "DateTime", /** * 日期 */ Date = "Date", /** * 枚举 */ Enum = "Enum", /** * 布尔 */ Boolean = "Boolean", /** * 数字 */ Number = "Number", /** * 备注 */ Text = "Text", /** * 大数字 */ BigNumber = "BigNumber" }