UNPKG

ngx-tagify

Version:

Angular library that wraps @yaireo/tagify

51 lines (50 loc) 2.32 kB
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { Observable } from 'rxjs'; import { TagData, TagifySettings } from '@yaireo/tagify'; import { TagifyService } from './tagify.service'; import * as i0 from "@angular/core"; export declare class TagifyComponent implements AfterViewInit, ControlValueAccessor, OnDestroy { private tagifyService; private element; private valueData; private valueType; private onChange; private onTouched; private unsubscribe$; private value$; private tagify; private skip; inputClassValue: string; private readonlyValue; private disabledValue; inputRef: ElementRef<HTMLInputElement>; settings: TagifySettings; name: string; whitelist: Observable<string[] | TagData[]>; set inputClass(v: string); set readonly(v: boolean); set disabled(v: boolean); get value(): string | TagData[]; set value(v: string | TagData[]); add: EventEmitter<any>; remove: EventEmitter<any>; tInput: EventEmitter<string>; constructor(tagifyService: TagifyService, element: ElementRef<HTMLElement>); ngAfterViewInit(): void; writeValue(tags: string | TagData[]): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; private setValue; /** * Tagify creates a `tags` element to which the classes of the `input` element are applied. * Changes of `inputClass` are applied automatically to the `input` element, but have to be * manually applied to the `tags` element. */ private setTagsClass; private setReadonly; private setDisabled; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<TagifyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TagifyComponent, "tagify", never, { "settings": { "alias": "settings"; "required": false; }; "name": { "alias": "name"; "required": false; }; "whitelist": { "alias": "whitelist"; "required": false; }; "inputClass": { "alias": "inputClass"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "add": "add"; "remove": "remove"; "tInput": "tInput"; }, never, ["*"], false, never>; }