@taiga-ui/core
Version:
Core library for creating Angular components and applications using Taiga UI
44 lines (43 loc) • 1.91 kB
TypeScript
import { type OnDestroy, ViewContainerRef } from '@angular/core';
import { type TuiBooleanHandler } from '@taiga-ui/cdk/types';
import { TuiDriver, type TuiRectAccessor } from '@taiga-ui/core/classes';
import { BehaviorSubject } from 'rxjs';
import { TuiDropdownDirective } from './dropdown.directive';
import * as i0 from "@angular/core";
export declare class TuiDropdownSelection extends TuiDriver implements TuiRectAccessor, OnDestroy {
private ghost?;
protected readonly doc: Document;
protected readonly vcr: ViewContainerRef;
protected readonly dropdown: TuiDropdownDirective;
protected readonly el: HTMLElement;
protected readonly handler$: BehaviorSubject<TuiBooleanHandler<Range>>;
protected readonly stream$: import("rxjs").Observable<boolean>;
protected range: Range;
position: 'selection' | 'tag' | 'word';
readonly type = "dropdown";
constructor();
set tuiDropdownSelection(visible: TuiBooleanHandler<Range> | string);
getClientRect(): DOMRect;
ngOnDestroy(): void;
private get ghostHost();
private getRange;
/**
* Check if given range is at least partially inside dropdown
*/
private inDropdown;
/**
* Check if Node is inside dropdown
*/
private boxContains;
/**
* Check if range is not inside tui-textfield's DOM elements
*/
private isValid;
private veryVerySadInputFix;
/**
* Create an invisible DIV styled exactly like input/textarea element inside directive
*/
private initGhost;
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownSelection, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDropdownSelection, "[tuiDropdownSelection]", never, { "position": { "alias": "tuiDropdownSelectionPosition"; "required": false; }; "tuiDropdownSelection": { "alias": "tuiDropdownSelection"; "required": false; }; }, {}, never, never, true, never>;
}