import { FormViewModel, FormViewModelField, FormVariable, Subscription, FormDeclaration, FormComponent, FormSchemaEntity, FormSchemaEntityField } from '../metadata'; export declare const ROOT_VIEW_MODEL_ID = "root-viewmodel"; export declare class DomDocumentService { private document; constructor(); loadDocument(jsonData: any): void; getDocument(): any; viewmodels: any; components: any[]; options: any; module: any; /** * 获取schemas节点下的uri (目前仅支持单一数据源) */ getSchemas(): any; setSchemas(schemaObject: any): void; setSchemaEntity(schemEntities: FormSchemaEntity[]): void; getQDPInfo(): any; getUpdateVersion(): any; extraImports: Array<{ name: string; path: string; }>; /** * 根据组件ID获取components下相应的组件节点 * @param componentId 组件标识 */ getComponentById(componentId: any): any; /** * 根据VM ID获取相应组件 * @param viewModelId VMID */ getComponentByVMId(viewModelId: string): any; /** * 根据viewModelId获取模型节点 * @param viewModelId 视图模型标识 */ getViewModelById(viewModelId: any): FormViewModel; getViewModelFieldById(viewModelId: string, fieldId: string): FormViewModelField; getViewModelByFieldId(fieldId: string): FormViewModel; /** * 校验指定VM下是否重复绑定字段或变量 * @param viewModelId 视图模型标识 * @param newFieldId 字段标识 */ checkViewModelDulplicated(viewModelId: any, newFieldId: any): boolean; /** * 修改ViewModel Field * @param viewModelId VM ID * @param fieldId 修改前binding.field取值 * @param changeObject 变更集 */ modifyViewModelFieldById(viewModelId: any, fieldId: any, changeObject: any): void; /** * 控件新增绑定添加ViewModel Field */ addViewModelField(viewModelId: any, filedObject: FormViewModelField): void; /** * 根据VMID修改ViewModel节点 * @param vmId 视图模型标识 * @param vmFields 字段集合 */ setViewModelFieldsById(vmId: any, vmFields: any): void; /** * 修改VM字段的分组名称 * @param viewModelId 视图模型标识 * @param groupId 分组标识 * @param groupName 分组名称 */ modifyGroupNameById(viewModelId: any, groupId: any, groupName: any): void; /** * 根据ID删除ViewModel中的field节点 * @param viewModelId 视图模型标识 * @param fieldId 字段标识 */ deleteViewModelFieldById(viewModelId: any, fieldId: any): void; /** * 清除视图模型中针对字段的修改 * @param viewModelId 视图模型标识 * @param fieldId 字段标识 */ clearViewModelFieldSchema(viewModelId: any, fieldId: any): void; /** * 根据ID删除整个ViewModel * @param viewModelId 视图模型标识 */ deleteViewModelById(viewModelId: any): void; /** * 删除dom中components下的组件节点 * @param cmpId 组件ID */ deleteComponent(cmpId: string): any[]; getWebCmds(): any[]; getServiceRefs(): any[]; /** * 获取表单ViewModel中的命令,构建treetable数据,用于事件的选择窗口 * 树表中额外增加commandPath属性(命令所在viewModelId.commandCode),用于窗口展开时数据行的回显。 */ getCommandsTreeTable(viewModelId: any): any[]; /** * 获取所有的命令,平铺成数组 */ getAllPlainCommands(): any[]; /** * 获取ViewModel中组件上下文变量,构建treetable数据,用于变量绑定的选择窗口 */ getLocaleVariablesByViewModelId(viewModelId: string): { data: { id: string; code: string; name: string; }; children: any[]; selectable: boolean; expanded: boolean; nodeType: string; }[]; /** * 获取ViewModel中远程(VO)上下文变量,构建treetable数据,用于变量绑定的选择窗口 */ getRemoteVariables(): any[]; /** * 更新远程变量 * @param varList 变量列表 */ updateRemoteVariables(varList: any): void; /** * schema中的变量转换为VM上的变量 * @param schemaVarList 变量列表 */ private changeSchemaVariable2VMVariable; /** * 保存变量(全量) * @param states * @param viewModelId */ saveVariables(states: FormVariable[], viewModelId: string): void; /** * 获取指定变量 */ getVariableByIdAndVMID(varId: string, viewModelId: string): FormVariable; /** * 获取指定变量 */ getVariableById(varId: string): any; /** * 获取所有VM下的变量,组装成树结构 * 树表中额外增加statePath属性(命令所在viewModelId.variableCode),用于窗口展开时数据行的回显。 */ getAllVariables(): any[]; /** * 获取所有VM下的变量并平铺成数组 * 额外增加statePath属性(命令所在viewModelId.variableCode),用于唯一标识 */ getAllPlainVariables(): any[]; /** * 1月3号以前的盘中缺失updateVersion字段,默认添加181225(上一次执行表单升级工具后的统一版本号) */ _adaptUpdateVersion(): void; /** * 根据字段ID获取VO字段信息(包括关联表字段) (此方法为适配旧表单viewModel.fieldName从VO取值的问题,待保留一段时间后删除) * @param id * @param fields */ getFieldByOriginID(id: string, fields: FormSchemaEntityField[]): FormSchemaEntityField; /** * 获取表字段列表(此方法为适配旧表单viewModel.fieldName从VO取值的问题,待保留一段时间后删除) * @param entities * @param bindTo */ private _getTableFieldsByBindTo; /** * 获取表Label(此方法为适配旧表单viewModel.fieldName从VO取值的问题,待保留一段时间后删除) * @param entities * @param bindTo */ private getTableLabelByBindTo; /** * 获取组件声明 */ getComponentDeclarations(): FormDeclaration; /** * 修改组件事件声明 * @param data */ setComponentDeclarations(data: any): void; /** * 获取事件订阅 */ getComponentSubscriptions(sourceComponent?: string): Subscription[]; /** * 修改事件订阅 * @param data */ setComponentSubscriptions(data?: any[]): void; deleteComponentSubscription(cmpId: string): void; /** * 设置外部组件信息 * @param cmpInfo 组件信息 * @param cmpId 外部组件id */ setExternalComponent(cmpInfo: any, cmpId: string): void; /** * 获取外部组件 * @param cmpId */ getExternalComponent(cmpId?: string): any; /** * 删除外部组件 * @param cmpId */ deleteExternalComponent(cmpId: string): any[]; /** * 获取指定VM关联的组件中绑定指定字段的控件(目前只有一个控件) * @param viewModelId VM标识 * @param fieldId 字段标识 */ getControlsInCmpWidthBinding(viewModelId: any, fieldId: any): any[]; /** * 获取指定VM关联的组件中绑定指定字段的控件 * @param contents DOM节点 * @param fieldId 字段标识 */ private getControlsByBinding; /** 获取参数映射对应的参数 * queryId 查询ID */ getParasMappingEditorParams(queryId: any, qoManagerCode: any, queryRelativeUrl: any): any; private updateOptions; /** * 根据id路径定位节点 * @param rootNode 根节点 * @param idPath id路径 */ getNodeByIdPath(rootNode: any, idPath: string): any; /** * 获取节点下所有 components ID 列表 * @param eleContents [] * @returns string[] */ getALLComponentsIDList(eleContents: { type: string; component: any; contents: []; }[]): string[]; /** * 添加component 方法,暂时只根据 bindTo 校验唯一性 * * @param component * @memberof DomService */ addComponent(component: FormComponent): string; /** * 添加 viewModel 方法,假设已经存在一致指向(bindTo)同一数据源的话则执行更新viewModel操作 * * @param viewModel:FormViewModel * @memberof DomService * @returns string viewModel id */ addViewModel(viewModel: FormViewModel): string; remarkFakeDel(removedList: string[]): void; } export declare class ExternalComponentInfo { id: string; uri: string; name: string; code: string; fileName: string; filePath: string; declarations: []; type: string; containerId: string; url: string; }