import * as i0 from '@angular/core'; import { InjectionToken, ModelSignal, Signal, OnDestroy, EventEmitter, ChangeDetectorRef, ElementRef, QueryList } from '@angular/core'; import { FocusMonitor } from '@angular/cdk/a11y'; import { ControlValueAccessor } from '@angular/forms'; import { NxAbstractControl } from '@aposin/ng-aquila/shared'; import { Subject } from 'rxjs'; import { NumberInput, BooleanInput } from '@angular/cdk/coercion'; import * as i1 from '@angular/common'; import * as i2 from '@aposin/ng-aquila/icon'; interface NxTaglist { } declare const TAGLIST: InjectionToken; declare class NxTagIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject; /** The aria label for the delete button */ deleteAriaLabel: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type NxTagType = 'tag' | 'keyword'; declare class NxTagGroupComponent implements ControlValueAccessor, NxAbstractControl { readonly name: string; private _elementRef; /** The value of the tag group, can be used as alternative to ngModel or reactive forms. */ readonly value: ModelSignal; /** Whether the tags should be disabled. */ readonly disabledInput: i0.InputSignalWithTransform; private readonly _accessorDisabled; readonly disabled: Signal; /** Whether the tags should be readonly. */ readonly readonly: ModelSignal; /** Whether the tags should be removable. */ readonly removable: i0.InputSignalWithTransform; /** Switches the appearance of the tags. */ readonly type: i0.InputSignal; private _onChange; private _onTouched; writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState?(isDisabled: boolean): void; setReadonly(value: boolean): void; addValue(value: any): void; removeValue(value: any): void; protected onBlur(event: FocusEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxTagComponent implements OnDestroy, NxAbstractControl { private readonly _cdr; private readonly _elementRef; private readonly _focusMonitor; intl: NxTagIntl; readonly tagGroup: NxTagGroupComponent | null; readonly tagList: NxTaglist | null; readonly id: string; private _input; private _lastInputNativeElement; /** Whether the tag should be readonly. */ readonly removableInput: i0.InputSignalWithTransform; readonly removable: Signal; /** * @deprecated Keyboard accessibility support will come from different solutions. * * Sets the tab-index of a tag. Default value: -1. */ readonly tabindex: i0.InputSignalWithTransform; /** * Sets the value of the tag. This value will be used in the tag group model. * If no content projection is used this will be used as the visual label. */ readonly value: i0.InputSignal; /** Sets the appearance of the tag. */ readonly typeInput: i0.InputSignal; readonly type: Signal; /** Set an aria-label on the remove button explicitly and not from the NxTagIntl class. */ readonly deleteAriaLabel: i0.InputSignal; /** Whether the tag should be disabled. */ readonly disabledInput: i0.InputSignalWithTransform; readonly disabled: Signal; /** Whether the tag should be readonly. */ readonly readonlyInput: ModelSignal; readonly readonly: Signal; readonly canHover: Signal; selected: Signal; protected role: Signal<"group" | "button" | null>; /** * An event is dispatched each time when the tag is clicked. * @deprecated Tags should not be clickable with the supported patterns. Needs to be kept for now for backwards compatibility with the deprecated taglist. */ readonly clicked: EventEmitter; /** An event dispatched when the tag should be deleted. */ readonly removed: EventEmitter; constructor(_cdr: ChangeDetectorRef, _elementRef: ElementRef, _focusMonitor: FocusMonitor); setReadonly(value: boolean): void; ngOnDestroy(): void; /** @docs-private */ removeHandler(event: MouseEvent): void; /** * @deprecated */ protected emitLegacyClicked(event: Event): void; protected handleInputClick(event: Event): void; protected toggleSelected(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated Use `nx-tag` components standalone or `nx-tag-group` instead. */ declare class NxTaglistComponent implements NxTaglist, ControlValueAccessor { private readonly _cdr; /** An event is dispatched each time when the list of tags changed. */ readonly tagsChange: EventEmitter; /** An event is dispatched each time when a tag is clicked. */ readonly tagClickEvent: EventEmitter; /** @docs-private */ tagChildren: QueryList; /** Sets the list of tags. */ set tags(value: any[]); get tags(): any[]; private _tags; /** Sets the tabindex of the contained tags. Default value: -1. */ set tabindex(value: NumberInput); get tabindex(): number; private _tabindex; /** Whether the tags can be removed from the list. Default: true. */ set allowTagDeletion(value: BooleanInput); get allowTagDeletion(): boolean; private _allowTagDeletion; /** Whether the tags can be styled as keywords. */ set isKeywordList(value: BooleanInput); get isKeywordList(): boolean; private _isKeywordList; /** Sets the label property, in case tags represent objects. */ set labelProperty(value: string); get labelProperty(): string; private _labelProperty; /** Sets the label property to improve accessibility. */ set labelledby(value: string); get labelledby(): string; private _ariaLabelledBy; /** Sets the customization function for tag value. */ set valueFormatter(fn: (value: any) => string); get valueFormatter(): (value: any) => string; private _valueFormatterFn; private _onChange; private _onTouched; constructor(_cdr: ChangeDetectorRef); /** Allows to delete a tag given index. Takes index of the tag to be deleted as a parameter */ delete(index: number, value: any): void; /** Allows to add a tag. Takes tag object as an input */ addTag(tag: any): void; /** Allows to clear the tag list. */ clearTags(): void; /** @docs-private */ writeValue(tags: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; /** @docs-private */ renderTag(tag: any): string; /** @docs-private */ tagClick(index: number, value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxTaglistModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NxTagComponent, NxTagGroupComponent, NxTagIntl, NxTaglistComponent, NxTaglistModule, TAGLIST }; export type { NxTagType, NxTaglist };