@taiga-ui/kit
Version:
Taiga UI Angular main components kit
77 lines (76 loc) • 3.63 kB
TypeScript
import { ChangeDetectorRef, ElementRef, EventEmitter, TemplateRef } from '@angular/core';
import { NgControl } from '@angular/forms';
import { AbstractTuiMultipleControl, TuiActiveZoneDirective, TuiBooleanHandler, TuiContextWithImplicit, TuiFocusableElementAccessor, TuiScrollService } from '@taiga-ui/cdk';
import { TuiDataListHost, TuiHintControllerDirective, TuiHorizontalDirection, TuiModeDirective, TuiScrollbarComponent, TuiSizeL, TuiSizeS, TuiTextfieldController } from '@taiga-ui/core';
import { TuiStatus } from '@taiga-ui/kit/enums';
import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
export declare class TuiInputTagComponent extends AbstractTuiMultipleControl<string> implements TuiFocusableElementAccessor, TuiDataListHost<string> {
private tuiScrollService;
private readonly elementRef;
readonly appearance: string;
private readonly modeDirective;
private readonly tagStatus;
readonly hintController: TuiHintControllerDirective;
readonly controller: TuiTextfieldController;
allowSpaces: boolean;
icon: string;
iconAlign: TuiHorizontalDirection;
search: string;
editable: boolean;
tagValidator: TuiBooleanHandler<string>;
expandable: boolean;
inputHidden: boolean;
disabledItemHandler: TuiBooleanHandler<string>;
set pseudoFocusedSetter(value: boolean | null);
readonly searchChange: EventEmitter<string>;
open: boolean;
set scrollerSetter(scroller: TuiScrollbarComponent | null);
readonly datalist?: TemplateRef<TuiContextWithImplicit<TuiActiveZoneDirective>>;
readonly errorIconTemplate?: TemplateRef<{}>;
private readonly dropdown?;
private readonly focusableElement?;
private readonly tagsContainer?;
private readonly tags;
private readonly scrollToStart$;
private readonly scrollToEnd$;
private readonly cleanerSvg?;
private readonly scrollBar?;
constructor(control: NgControl | null, changeDetectorRef: ChangeDetectorRef, tuiScrollService: TuiScrollService, elementRef: ElementRef<HTMLElement>, appearance: string, modeDirective: TuiModeDirective | null, tagStatus: TuiStatus, hintController: TuiHintControllerDirective, controller: TuiTextfieldController);
get nativeFocusableElement(): HTMLInputElement | null;
get focused(): boolean;
get size(): TuiSizeL | TuiSizeS;
get labelOutside(): boolean;
get hasCleaner(): boolean;
get hasNativeValue(): boolean;
get hasValue(): boolean;
get hasPlaceholder(): boolean;
get placeholderRaised(): boolean;
get hasExampleText(): boolean;
get hasTooltip(): boolean;
get iconAlignLeft(): boolean;
get iconAlignRight(): boolean;
get hasRightIcons(): boolean;
get status(): TuiStatus;
getLeftContent(tag: string): PolymorpheusContent | null;
onCleanerClick(): void;
onActiveZone(active: boolean): void;
onMouseDown(event: MouseEvent): void;
onFieldKeyDownBackspace(event: KeyboardEvent): void;
onFieldKeyDownArrowLeft(event: KeyboardEvent): void;
onFieldKeyDownEnter(): void;
onTagKeyDownArrowLeft(currentIndex: number): void;
onTagKeyDownArrowRight(currentIndex: number): void;
onTagEdited(value: string, editedTag: string): void;
handleOption(item: string): void;
onInput(value: string): void;
onHoveredChange(hovered: boolean): void;
setDisabledState(): void;
private onScrollKeyDown;
private initScrollerSubscrition;
protected updateValue(value: Array<string>): void;
private updateSearch;
private shouldScroll;
private addTag;
private deleteLastEnabledItem;
private focusInput;
}