import { EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { DesignerHostSettingService, DesignViewModelService, DomService, FormBasicService, SchemaService } from '@farris/designer-services'; import { DropResult } from '@farris/smooth-dnd'; import { LocaleService } from '@farris/ui-locale'; import { NotifyService } from '@farris/ui-notify'; import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; declare class GridFieldEditorParam { viewModelId: string; gridData: any; } /** * 列表/树列表的列选择器,生成GridField/TreeGridField */ export declare class GridFieldEditorComponent implements OnInit, OnDestroy { private dgVMService; private notifyService; private domService; private designerHost; private formBasicService; private schemaService; private localeService; closeModal: EventEmitter; submitModal: EventEmitter; value: any; editorParams: GridFieldEditorParam; modalFooter: TemplateRef; /** * 编辑器默认弹出窗口显示属性 */ readonly modalConfig: { title: any; width: number; height: number; showButtons: boolean; }; sourceTree: TreeTableComponent; idField: string; cls: string; readonly leftCheckeds: any[]; selectedColumns: any[]; rightCheckeds: any; sourceColumnsTreeData: TreeNode[]; plainColumns: TreeNode[]; /** 控件创建服务 */ private controlCreatorService; /** 同一个实体,已经在其他列表中使用过的字段id */ private fieldIdsInOhterGrids; private selectMoveColumnMsg; private selectCancelColumnMsg; constructor(dgVMService: DesignViewModelService, notifyService: NotifyService, domService: DomService, designerHost: DesignerHostSettingService, formBasicService: FormBasicService, schemaService: SchemaService, localeService: LocaleService); ngOnInit(): void; ngOnDestroy(): void; /** * 获取已选择的列 */ getSelectedColumns(): any[]; /** * 获取在其他列表中已使用的字段id,这些字段在当前列表中不允许再添加 */ private getFieldIdsInOtherForms; isChecked(col: any, direction: string): boolean; /** * 字段是否可勾选 * 1、已选字段不可勾选 * 2、主表的udt字段、关联字段不可勾选 * @param col */ canChecked(col: any): boolean; hasCheckeds(side: string): boolean; rightColumnChecked(col: any): void; /** 右移 */ moveToRight(): void; private clearSelections; /** * 全部右移:主表的关联、udt字段不可右移 */ moveAllToRight(): void; /** 左移 */ moveToLeft(): void; /** 全部左移 */ moveAllToLeft(): void; _getSelectColumnInfo(): { cols: {}[]; index: number; }; /** 置顶 */ moveTop(): void; /** 上移 */ moveUp(): void; /** 下移 */ moveDown(): void; /** 置底 */ moveBottom(): void; private convertTreeNodes2PlainObject; getTreeNodeByID(fieldId: string): TreeNode; /** * 确定 */ clickConfirm(): void; /** * 取消 */ clickCancel(): void; private _getDataField; onDrop({ removedIndex, addedIndex, payload }: DropResult): void; getGhostParent(): HTMLElement; getSourceTreeChildPayload(index: number): any; private makeSourceTreeDraggable; } export {};