UNPKG

ngx-float-ui

Version:

ngx-float-ui is an Angular wrapper for Floating UI

213 lines (204 loc) 10.2 kB
import * as i0 from '@angular/core'; import { OnDestroy, ElementRef, ViewContainerRef, ChangeDetectorRef, EventEmitter, OnInit, ComponentRef, Provider, ModuleWithProviders } from '@angular/core'; import { Subject } from 'rxjs'; import * as i1 from '@angular/common'; declare enum NgxFloatUiTriggers { click = "click", hover = "hover", mousedown = "mousedown", none = "none" } declare enum NgxFloatUiPlacements { AUTO = "auto", AUTOSTART = "auto-start", AUTOEND = "auto-end", TOP = "top", BOTTOM = "bottom", LEFT = "left", RIGHT = "right", TOPSTART = "top-start", BOTTOMSTART = "bottom-start", LEFTSTART = "left-start", RIGHTSTART = "right-start", TOPEND = "top-end", BOTTOMEND = "bottom-end", LEFTEND = "left-end", RIGHTEND = "right-end" } interface NgxFloatUiOptions { appendTo?: string; applyArrowClass?: string; applyClass?: string; ariaDescribe?: string; ariaRole?: string; boundariesElement?: string; disableAnimation?: boolean; disableDefaultStyling?: boolean; hideOnClickOutside?: boolean; hideOnMouseLeave?: boolean; hideOnScroll?: boolean; placement?: NgxFloatUiPlacements; positionFixed?: boolean; preventOverflow?: boolean; showDelay?: number; styles?: { [key: string]: string; }; trigger?: NgxFloatUiTriggers; } type NgxFloatUiOptionsKey = keyof NgxFloatUiOptions; declare class NgxFloatUiContentComponent implements OnDestroy { elRef: ElementRef; protected _viewRef: ViewContainerRef; protected _changeDetectorRef: ChangeDetectorRef; static nextId: number; protected get _dynamicArrowSides(): { top: string; right: string; bottom: string; left: string; }; protected get _sideAxis(): { left: string; top: string; right: string; bottom: string; }; protected get _staticArrowSides(): { top: string; right: string; bottom: string; left: string; }; ariaHidden: string; arrowColor: string | null; displayType: string; floatUiOptions: NgxFloatUiOptions; floatUiSwitch: () => void; floatUiViewRef: ElementRef; id: string; isMouseOver: boolean; onHidden: EventEmitter<any>; onUpdate: () => any; opacity: number; referenceObject: HTMLElement; state: boolean; text: string; protected _destroy$: Subject<void>; protected _resizeCtrl$: Subject<void>; protected _styleId: string; constructor(elRef: ElementRef, _viewRef: ViewContainerRef, _changeDetectorRef: ChangeDetectorRef); clean(): void; extractAppliedClassListExpr(classList?: string | string[]): object; hide(): void; ngOnDestroy(): void; onDocumentResize(): void; onMouseOver(): void; show(): void; showOnLeave(): void; toggleVisibility(state: boolean): void; update(): void; protected _computePosition(): void; protected _createArrowSelector(): string; protected _determineArrowColor(): boolean; protected _toggleVisibility(state: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgxFloatUiContentComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgxFloatUiContentComponent, "float-ui-content", ["ngxFloatUiContent"], {}, {}, never, ["*", "*"], true, never>; } declare class NgxFloatUiDirective implements OnInit, OnDestroy { protected _changeDetectorRef: ChangeDetectorRef; protected _elementRef: ElementRef; protected _vcr: ViewContainerRef; protected _popperDefaults: NgxFloatUiOptions; static baseOptions: NgxFloatUiOptions; set applyClass(newValue: string); get applyClass(): string; set arrowClass(newValue: string); get arrowClass(): string; set disabled(newValue: boolean); get disabled(): boolean; set floatUi(newValue: string | NgxFloatUiContentComponent); get floatUi(): string | NgxFloatUiContentComponent; set hideOnClickOutside(newValue: boolean | string); get hideOnClickOutside(): boolean; set placement(newValue: NgxFloatUiPlacements); get placement(): NgxFloatUiPlacements; set preventOverflow(newValue: boolean); get preventOverflow(): boolean; set showOnStart(newValue: boolean); get showOnStart(): boolean; appendTo: string; ariaDescribe: string | void; ariaRole: string | void; boundariesElement: string; disableAnimation: boolean; disableStyle: boolean; hideOnMouseLeave: boolean | void; hideOnScroll: boolean | void; hideTimeout: number; onHidden: EventEmitter<NgxFloatUiDirective>; onShown: EventEmitter<NgxFloatUiDirective>; onUpdate: EventEmitter<void>; positionFixed: boolean; showDelay: number | undefined; showTrigger: NgxFloatUiTriggers | undefined; styles: object; targetElement: HTMLElement; timeoutAfterShow: number; protected _applyClass: string; protected _arrowClass: string; protected _content: NgxFloatUiContentComponent; protected _contentClass: typeof NgxFloatUiContentComponent; protected _contentRef: ComponentRef<NgxFloatUiContentComponent>; protected _destroy$: Subject<void>; protected _disabled: boolean; protected _floatUi: string | NgxFloatUiContentComponent; protected _globalEventListenersCtrl$: Subject<void>; protected _hideOnClickOutside: boolean; protected _placement: NgxFloatUiPlacements; protected _preventOverflow: boolean; protected _scheduledHideTimeoutCtrl$: Subject<void>; protected _scheduledShowTimeoutCtrl$: Subject<void>; protected _shown: boolean; protected _showOnStart: boolean; constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _vcr: ViewContainerRef, _popperDefaults?: NgxFloatUiOptions); static assignDefined(target: any, ...sources: any[]): any; applyTriggerListeners(): void; getRefElement(): any; hide(): void; hideOnClickOutsideHandler($event: MouseEvent): void; hideOnScrollHandler($event: MouseEvent): void; ngOnDestroy(): void; ngOnInit(): void; scheduledHide($event?: any, delay?: number): void; scheduledShow(delay?: number): void; show(): void; toggle(): void; protected _addListener(eventName: string, cb: () => void): void; protected _applyChanges(): void; protected _checkExisting(key: string, newValue: string | number | boolean | NgxFloatUiPlacements): void; protected _constructContent(): NgxFloatUiContentComponent; protected _getScrollParent(node: any): any; protected _onPopperUpdate(): void; protected _setContentProperties(popperRef: NgxFloatUiContentComponent): void; protected _setDefaults(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgxFloatUiDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFloatUiDirective, "[floatUi]", ["floatUi"], { "applyClass": { "alias": "applyClass"; "required": false; }; "arrowClass": { "alias": "arrowClass"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "floatUi": { "alias": "floatUi"; "required": false; }; "hideOnClickOutside": { "alias": "hideOnClickOutside"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "preventOverflow": { "alias": "preventOverflow"; "required": false; }; "showOnStart": { "alias": "showOnStart"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "ariaDescribe": { "alias": "ariaDescribe"; "required": false; }; "ariaRole": { "alias": "ariaRole"; "required": false; }; "boundariesElement": { "alias": "boundariesElement"; "required": false; }; "disableAnimation": { "alias": "disableAnimation"; "required": false; }; "disableStyle": { "alias": "disableStyle"; "required": false; }; "hideOnMouseLeave": { "alias": "hideOnMouseLeave"; "required": false; }; "hideOnScroll": { "alias": "hideOnScroll"; "required": false; }; "hideTimeout": { "alias": "hideTimeout"; "required": false; }; "positionFixed": { "alias": "positionFixed"; "required": false; }; "showDelay": { "alias": "showDelay"; "required": false; }; "showTrigger": { "alias": "showTrigger"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "targetElement": { "alias": "targetElement"; "required": false; }; "timeoutAfterShow": { "alias": "timeoutAfterShow"; "required": false; }; }, { "onHidden": "onHidden"; "onShown": "onShown"; "onUpdate": "onUpdate"; }, never, never, true, never>; } declare class NgxFloatUiLooseDirective extends NgxFloatUiDirective { set floatUiLoose(newValue: string | NgxFloatUiContentComponent); set loosePlacement(newValue: `${NgxFloatUiPlacements}`); set looseTrigger(newValue: `${NgxFloatUiTriggers}`); constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, vcr: ViewContainerRef, popperDefaults?: NgxFloatUiOptions); static ɵfac: i0.ɵɵFactoryDeclaration<NgxFloatUiLooseDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFloatUiLooseDirective, "[floatUiLoose]", ["floatUiLoose"], { "floatUiLoose": { "alias": "floatUiLoose"; "required": false; }; "loosePlacement": { "alias": "loosePlacement"; "required": false; }; "looseTrigger": { "alias": "looseTrigger"; "required": false; }; }, {}, never, never, true, never>; } declare function provideNgxFloatUiOptions(config?: NgxFloatUiOptions): Provider[]; declare class NgxFloatUiModule { static forRoot(popperBaseOptions?: NgxFloatUiOptions): ModuleWithProviders<NgxFloatUiModule>; static ɵfac: i0.ɵɵFactoryDeclaration<NgxFloatUiModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NgxFloatUiModule, never, [typeof i1.CommonModule, typeof NgxFloatUiContentComponent, typeof NgxFloatUiDirective, typeof NgxFloatUiLooseDirective], [typeof NgxFloatUiContentComponent, typeof NgxFloatUiDirective, typeof NgxFloatUiLooseDirective]>; static ɵinj: i0.ɵɵInjectorDeclaration<NgxFloatUiModule>; } export { NgxFloatUiContentComponent, NgxFloatUiDirective, NgxFloatUiLooseDirective, NgxFloatUiModule, NgxFloatUiPlacements, NgxFloatUiTriggers, provideNgxFloatUiOptions }; export type { NgxFloatUiOptions, NgxFloatUiOptionsKey };