import { OnDestroy, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { DynamicFormCommonConfig } from 'zr-dynamic-form/dynamic-form-common'; import { AbstractControlContainerComponent } from '../../controls/abstract-control-container/abstract-control-container.component'; import { ControlNameService } from '../../services/control-name.service'; import { ControlSharedService } from '../../services/control-shared.service'; import { ControlTranslateService } from '../../services/control-translate.service'; import { ControlValidatorService } from '../../services/control-validator.service'; import { DragService } from '../../services/drag.service'; import { ValidatorNameService } from '../../services/validator-name.service'; import { ToolAdapterService } from '../../tools/tool-adapter.service'; import { DynamicForm } from '../../types'; import { AbstractContainer, AbstractControl, ControlDataModel, ControlLayoutModel, ControlViewModel, LayoutControlContainer } from '../../types/control.types'; import { ControlTranslate } from '../../utils'; import { LayoutHostDirective } from '../layout-host.directive'; export declare class LayoutDesignerComponent extends AbstractControlContainerComponent implements DynamicForm, LayoutControlContainer, OnInit, OnDestroy { controlTranslateService: ControlTranslateService; private toolAdapter; private dragService; private controlNameService; private validatorNameService; private commonConfig; private controlValidatorService; formCode?: string; labelCode?: string; targetId?: string; controls: AbstractControl[]; globalData: any; disableOperateControl: boolean; dataModels: Array; layoutHost: LayoutHostDirective; isContainer: boolean; children: AbstractControl[]; control: AbstractContainer; controlTranslate: ControlTranslate; cursor: string; private _globalData; private _controlNames; private _controlIdentityCodes; private _dataModels; private _sub; constructor(controlTranslateService: ControlTranslateService, toolAdapter: ToolAdapterService, dragService: DragService, controlNameService: ControlNameService, validatorNameService: ValidatorNameService, commonConfig: DynamicFormCommonConfig, controlValidatorService: ControlValidatorService, controlSharedService: ControlSharedService); ngOnInit(): void; ngOnDestroy(): void; /** * 设置控件隐藏 */ setControlHiddenByName(name: string, isHidden: boolean): void; setControlHidden(control: AbstractControl, isHidden: boolean): void; /** * 根据控件名称查找控件 */ findControlByName(name: string): AbstractControl; loadComponents(): void; getDataModels(): Array; addControls(controls: Array): Observable[]>; addControl(control: ControlLayoutModel): Observable>; select(): void; onMouseup(): void; private subscribeControlResolved; /** * 移除控件名称 * */ private removeControlName; /** * 设置控件的名称 * */ private setControlsName; /** * 设置控件名称,如果为空则自动生成新的 * */ private setControlName; /** * 获取一个新的控件名称,名称会根据类型按照递增的顺序加一,如果中间有空缺则会补上 * */ private getNewControlName; /** * 处理控件名称,如果失败则会返回error * */ private handleName; private handleCasCadeParentName; private handleUnionCheckName; /** * 控件名称提示错误信息 * */ private nameError; private setControlIdentityCode; private getUniqueCode; }