UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

231 lines (218 loc) 12.1 kB
import * as i0 from '@angular/core'; import { AfterViewInit, DoCheck, TemplateRef, OnChanges, OnInit, ViewContainerRef, ComponentRef, SimpleChanges, ElementRef, AfterContentInit, QueryList } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; import { NzVariant, NzSizeLDSType, NzStatus, NzValidateStatus, NgClassInterface, OnTouchedType } from 'ng-zorro-antd/core/types'; import { NgControl, ControlValueAccessor, FormArray, FormControl } from '@angular/forms'; import { Subject } from 'rxjs'; import { NzFormItemFeedbackIconComponent } from 'ng-zorro-antd/core/form'; import * as i1 from 'ng-zorro-antd/space'; interface AutoSizeType { minRows?: number; maxRows?: number; } declare class NzAutosizeDirective implements AfterViewInit, DoCheck { private ngZone; private platform; private destroyRef; private resizeService; private el; private autosize; private cachedLineHeight; private previousValue; private previousMinRows; private minRows; private maxRows; private maxHeight; private minHeight; private inputGap; private destroyed; constructor(); set nzAutosize(value: string | boolean | AutoSizeType); resizeToFitContent(force?: boolean): void; private cacheTextareaLineHeight; setMinHeight(): number | null; setMaxHeight(): number | null; noopInputHandler(): void; ngAfterViewInit(): void; ngDoCheck(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NzAutosizeDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzAutosizeDirective, "textarea[nzAutosize]", ["nzAutosize"], { "nzAutosize": { "alias": "nzAutosize"; "required": false; }; }, {}, never, never, true, never>; } declare class NzInputAddonBeforeDirective { static ɵfac: i0.ɵɵFactoryDeclaration<NzInputAddonBeforeDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzInputAddonBeforeDirective, "[nzInputAddonBefore]", never, {}, {}, never, never, true, never>; } declare class NzInputAddonAfterDirective { static ɵfac: i0.ɵɵFactoryDeclaration<NzInputAddonAfterDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzInputAddonAfterDirective, "[nzInputAddonAfter]", never, {}, {}, never, never, true, never>; } declare class NzInputPrefixDirective { static ɵfac: i0.ɵɵFactoryDeclaration<NzInputPrefixDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzInputPrefixDirective, "[nzInputPrefix]", never, {}, {}, never, never, true, never>; } declare class NzInputSuffixDirective { static ɵfac: i0.ɵɵFactoryDeclaration<NzInputSuffixDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzInputSuffixDirective, "[nzInputSuffix]", never, {}, {}, never, never, true, never>; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzInputGroupSlotComponent { icon?: string | null; type: 'addon' | 'prefix' | 'suffix' | null; template?: string | TemplateRef<void> | null; static ɵfac: i0.ɵɵFactoryDeclaration<NzInputGroupSlotComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzInputGroupSlotComponent, "[nz-input-group-slot]", never, { "icon": { "alias": "icon"; "required": false; }; "type": { "alias": "type"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, ["*"], true, never>; } declare class NzInputDirective implements OnChanges, OnInit { private renderer; private elementRef; protected hostView: ViewContainerRef; private directionality; private compactSize; private destroyRef; private nzFormStatusService; private nzFormNoStatusService; private focusMonitor; /** * @deprecated Will be removed in v21. It is recommended to use `nzVariant` instead. */ nzBorderless: boolean; nzVariant: NzVariant; nzSize: NzSizeLDSType; nzStepperless: boolean; nzStatus: NzStatus; get disabled(): boolean; set disabled(value: boolean); _disabled: boolean; disabled$: Subject<boolean>; dir: Direction; prefixCls: string; status: NzValidateStatus; statusCls: NgClassInterface; hasFeedback: boolean; feedbackRef: ComponentRef<NzFormItemFeedbackIconComponent> | null; components: Array<ComponentRef<NzFormItemFeedbackIconComponent>>; ngControl: NgControl | null; protected focused: i0.WritableSignal<boolean>; protected finalSize: i0.Signal<NzSizeLDSType>; private size; constructor(); ngOnInit(): void; ngOnChanges({ disabled, nzStatus, nzSize }: SimpleChanges): void; private setStatusStyles; private renderFeedbackIcon; static ɵfac: i0.ɵɵFactoryDeclaration<NzInputDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzInputDirective, "input[nz-input],textarea[nz-input]", ["nzInput"], { "nzBorderless": { "alias": "nzBorderless"; "required": false; }; "nzVariant": { "alias": "nzVariant"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzStepperless": { "alias": "nzStepperless"; "required": false; }; "nzStatus": { "alias": "nzStatus"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.NzSpaceCompactItemDirective; inputs: {}; outputs: {}; }]>; static ngAcceptInputType_nzBorderless: unknown; static ngAcceptInputType_nzStepperless: unknown; static ngAcceptInputType_disabled: unknown; } declare class NzInputGroupWhitSuffixOrPrefixDirective { readonly elementRef: ElementRef<any>; static ɵfac: i0.ɵɵFactoryDeclaration<NzInputGroupWhitSuffixOrPrefixDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NzInputGroupWhitSuffixOrPrefixDirective, "nz-input-group[nzSuffix], nz-input-group[nzPrefix]", never, {}, {}, never, never, true, never>; } declare class NzInputGroupComponent implements AfterContentInit, OnChanges, OnInit { private focusMonitor; private elementRef; private renderer; private cdr; private directionality; private destroyRef; private nzFormStatusService; private nzFormNoStatusService; listOfNzInputDirective: QueryList<NzInputDirective>; nzAddOnBeforeIcon?: string | null; nzAddOnAfterIcon?: string | null; nzPrefixIcon?: string | null; nzSuffixIcon?: string | null; nzAddOnBefore?: string | TemplateRef<void>; nzAddOnAfter?: string | TemplateRef<void>; nzPrefix?: string | TemplateRef<void>; nzStatus: NzStatus; nzSuffix?: string | TemplateRef<void>; nzSize: NzSizeLDSType; nzSearch: boolean; isLarge: boolean; isSmall: boolean; isAffix: boolean; isAddOn: boolean; isFeedback: boolean; focused: boolean; disabled: boolean; dir: Direction; prefixCls: string; affixStatusCls: NgClassInterface; groupStatusCls: NgClassInterface; affixInGroupStatusCls: NgClassInterface; status: NzValidateStatus; hasFeedback: boolean; constructor(); updateChildrenInputSize(): void; ngOnInit(): void; ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; private setStatusStyles; static ɵfac: i0.ɵɵFactoryDeclaration<NzInputGroupComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzInputGroupComponent, "nz-input-group", ["nzInputGroup"], { "nzAddOnBeforeIcon": { "alias": "nzAddOnBeforeIcon"; "required": false; }; "nzAddOnAfterIcon": { "alias": "nzAddOnAfterIcon"; "required": false; }; "nzPrefixIcon": { "alias": "nzPrefixIcon"; "required": false; }; "nzSuffixIcon": { "alias": "nzSuffixIcon"; "required": false; }; "nzAddOnBefore": { "alias": "nzAddOnBefore"; "required": false; }; "nzAddOnAfter": { "alias": "nzAddOnAfter"; "required": false; }; "nzPrefix": { "alias": "nzPrefix"; "required": false; }; "nzStatus": { "alias": "nzStatus"; "required": false; }; "nzSuffix": { "alias": "nzSuffix"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzSearch": { "alias": "nzSearch"; "required": false; }; }, {}, ["listOfNzInputDirective"], ["*"], true, [{ directive: typeof i1.NzSpaceCompactItemDirective; inputs: {}; outputs: {}; }]>; static ngAcceptInputType_nzSearch: unknown; } declare class NzInputOtpComponent implements ControlValueAccessor, OnChanges { private formBuilder; private destroyRef; otpInputs: QueryList<ElementRef>; nzLength: number; nzSize: NzSizeLDSType; disabled: boolean; nzStatus: NzStatus; nzFormatter: (value: string) => string; nzMask: string | null; protected otpArray: FormArray<FormControl<string>>; private internalValue; private onChangeCallback?; onTouched: OnTouchedType; constructor(); ngOnChanges(changes: SimpleChanges): void; onInput(index: number, event: Event): void; onFocus(event: FocusEvent): void; onKeyDown(index: number, event: KeyboardEvent): void; writeValue(value: string): void; registerOnChange(fn: (value: string) => void): void; registerOnTouched(fn: () => {}): void; setDisabledState(isDisabled: boolean): void; onPaste(index: number, event: ClipboardEvent): void; private createFormArray; private emitValue; private selectInputBox; static ɵfac: i0.ɵɵFactoryDeclaration<NzInputOtpComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzInputOtpComponent, "nz-input-otp", ["nzInputOtp"], { "nzLength": { "alias": "nzLength"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "nzStatus": { "alias": "nzStatus"; "required": false; }; "nzFormatter": { "alias": "nzFormatter"; "required": false; }; "nzMask": { "alias": "nzMask"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_nzLength: unknown; static ngAcceptInputType_disabled: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTextareaCountComponent implements AfterContentInit { private renderer; private destroyRef; private elementRef; nzInputDirective: NzInputDirective; nzMaxCharacterCount: number; nzComputeCharacterCount: (v: string) => number; nzFormatter: (cur: number, max: number) => string; ngAfterContentInit(): void; setDataCount(value: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<NzTextareaCountComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NzTextareaCountComponent, "nz-textarea-count", never, { "nzMaxCharacterCount": { "alias": "nzMaxCharacterCount"; "required": false; }; "nzComputeCharacterCount": { "alias": "nzComputeCharacterCount"; "required": false; }; "nzFormatter": { "alias": "nzFormatter"; "required": false; }; }, {}, ["nzInputDirective"], ["textarea[nz-input]"], true, never>; static ngAcceptInputType_nzMaxCharacterCount: unknown; } declare class NzInputModule { static ɵfac: i0.ɵɵFactoryDeclaration<NzInputModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NzInputModule, never, [typeof NzTextareaCountComponent, typeof NzInputDirective, typeof NzInputGroupComponent, typeof NzAutosizeDirective, typeof NzInputGroupSlotComponent, typeof NzInputGroupWhitSuffixOrPrefixDirective, typeof NzInputOtpComponent], [typeof NzTextareaCountComponent, typeof NzInputDirective, typeof NzInputGroupComponent, typeof NzAutosizeDirective, typeof NzInputGroupWhitSuffixOrPrefixDirective, typeof NzInputOtpComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<NzInputModule>; } export { NzAutosizeDirective, NzInputAddonAfterDirective, NzInputAddonBeforeDirective, NzInputDirective, NzInputGroupComponent, NzInputGroupSlotComponent, NzInputGroupWhitSuffixOrPrefixDirective, NzInputModule, NzInputOtpComponent, NzInputPrefixDirective, NzInputSuffixDirective, NzTextareaCountComponent }; export type { AutoSizeType };