import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, InjectionToken, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core'; import { NgControl } from '@angular/forms'; import { CanColor, MixinElementRefBase, ThemePalette } from '@ngx-simple/core/common-behaviors'; import { SimErrorDirective } from './error.directive'; import { SimFormFieldControl } from './form-field-control'; import { SimFormFieldLabelComponent } from './form-field-label.component'; import { SimFormDirective } from './form.directive'; import { SimHintDirective } from './hint.directive'; import { SimPrefixDirective } from './prefix.directive'; import { SimSuffixDirective } from './suffix.directive'; /** 注入标记,可用于注入'SimFormFieldComponent'实例。它作为实际'SimFormFieldComponent'类的替代标记,这会导致'SimFormFieldComponent'类及其组件元数据的不必要保留。 */ export declare const SIM_FORM_FIELD: InjectionToken; /** form-field 的外观样式 */ export declare type SimFormFieldAppearance = 'standard' | 'fill' | 'outline' | 'underline'; /** * 表示可以使用'SIM_FORM_FIELD_DEFAULT_OPTIONS'注入令牌配置的表单字段的默认选项。 */ export interface SimFormFieldDefaultOptions { appearance?: SimFormFieldAppearance; hideRequiredMarker?: boolean; } /** * 注入令牌,可用于配置应用程序中所有form-field的默认选项。 */ export declare const SIM_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken; declare const _SimFormFieldMixinBase: import("../../../dist/libs/core/common-behaviors/constructor").Constructor & typeof MixinElementRefBase; export declare class SimFormFieldComponent extends _SimFormFieldMixinBase implements OnInit, AfterContentInit, AfterViewInit, OnDestroy, CanColor { private renderer; private _changeDetectorRef; private formDirective; private _defaults; color: ThemePalette; /** * 显示外观 * - standard 标准的,使用子SimFormFieldControl的样式 * - outline 忽略子SimFormFieldControl的样式 使用边框包裹 * - underline 忽略子SimFormFieldControl的样式 使用下划线包裹 * - fill 忽略子SimFormFieldControl的样式 使用背景包裹 */ appearance: SimFormFieldAppearance; /** 标签显示宽度 */ labelWidth: string; subscriptAnimationState: string; _controlNonStatic: SimFormFieldControl; _controlStatic: SimFormFieldControl; get _control(): SimFormFieldControl; set _control(value: SimFormFieldControl); private _explicitFormFieldControl; _labelChild: SimFormFieldLabelComponent; _errorChildren: QueryList; _hintChildren: QueryList; _prefixChildren: QueryList; _suffixChildren: QueryList; _connectionContainerRef: ElementRef; _inputContainerRef: ElementRef; _hideRequiredMarker: boolean; private _destroyed; constructor(_elementRef: ElementRef, renderer: Renderer2, _changeDetectorRef: ChangeDetectorRef, formDirective: SimFormDirective, _defaults: SimFormFieldDefaultOptions); ngOnInit(): void; ngAfterViewInit(): void; ngAfterContentInit(): void; ngOnDestroy(): void; /** 确定是否应该将来自`NgControl`的`class`转发到`` */ _shouldForward(prop: keyof NgControl): boolean; /** 获取显示消息 */ _getDisplayedMessages(): 'error' | 'hint'; /** 获取弹层的起始源位置 */ getConnectedOverlayOrigin(): ElementRef; /** 如果缺少表单字段的控件,则会引发错误。 */ private _validateControlChild; /** 执行处理提示时所需的任何额外处理 */ private _processHints; /** * 确保指定的每个''对齐最多有一个,属性被认为是'align="start"'。 */ private _validateHints; /** * 设置描述子控件的元素id列表。这允许控件相应地更新其'aria-describedby`属性。 */ private _syncDescribedByIds; } export {};