@alauda/ui
Version:
Angular UI components by Alauda Frontend Team.
38 lines (37 loc) • 2.3 kB
TypeScript
import { AfterContentInit, ChangeDetectorRef, OnDestroy, QueryList } from '@angular/core';
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
import { Observable } from 'rxjs';
import { Bem } from '../../internal/utils';
import { FormDirective } from '../form.directive';
import { FormItemWidth, LabelPosition } from '../form.types';
import { FormItemAddonDirective, FormItemControlDirective, FormItemErrorDirective, FormItemHintDirective, FormItemLabelDirective } from '../helper-directives';
import * as i0 from "@angular/core";
export declare class FormItemComponent implements AfterContentInit, OnDestroy {
private readonly cdr;
private readonly auiForm;
bem: Bem;
labelWidth: string;
width: FormItemWidth;
labelPosition: LabelPosition;
emptyAddon: boolean;
plain: boolean;
itemLabel: FormItemLabelDirective;
itemControl: FormItemControlDirective;
ngControls: QueryList<NgControl>;
addons: QueryList<FormItemAddonDirective>;
errors: QueryList<FormItemErrorDirective>;
hints: QueryList<FormItemHintDirective>;
hasError$: Observable<boolean>;
errorCount$: Observable<number>;
hintCount$: Observable<number>;
parentForm: FormGroupDirective | NgForm;
private readonly destroy$$;
get formItemWidthClass(): string;
constructor(cdr: ChangeDetectorRef, auiForm: FormDirective, ngForm: NgForm, formGroup: FormGroupDirective);
ngAfterContentInit(): void;
subscribeInputsFromParent(): void;
mapControlStatus(control: NgControl): Observable<boolean>;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormItemComponent, [null, { optional: true; }, { optional: true; }, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormItemComponent, "aui-form-item", never, { "labelWidth": { "alias": "labelWidth"; "required": false; }; "width": { "alias": "width"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "emptyAddon": { "alias": "emptyAddon"; "required": false; }; "plain": { "alias": "plain"; "required": false; }; }, {}, ["itemLabel", "itemControl", "ngControls", "addons", "errors", "hints"], ["label[auiFormItemLabel]", "*", "[auiFormItemAddon]", "[auiFormItemError]", "[auiFormItemHint]"], true, never>;
}