@nova-ui/bits
Version:
SolarWinds Nova Framework
85 lines (84 loc) • 4.09 kB
TypeScript
import { AfterContentInit, ApplicationRef, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, ElementRef, EventEmitter, Injector, OnDestroy, OnInit } from "@angular/core";
import { Subject } from "rxjs";
import { PopupContainerComponent } from "./popup-container.component";
import { PopupContainerService } from "./popup-container.service";
import { PopupToggleDirective } from "./popup-toggle.directive";
import { EdgeDetectionService } from "../../services/edge-detection.service";
import { EventBusService } from "../../services/event-bus.service";
import { LoggerService } from "../../services/log-service";
import * as i0 from "@angular/core";
/**
* @deprecated in v11 - Use PopupComponent instead - Removal: NUI-5796
*/
/**
* __Name :__
* NUI Pop-up component.
*
* __Usage :__
* Component represents basic functionality for dropdowns, popups, etc.
* May be used directly. Use "nuiPopupToggle" attribute inside any layer of content
* to define element that will toggle popover. Use "popupAreaContent" attribute inside
* 1st layer of content to define "popup area". DO NOT USE "opened" WITH "nuiPopupToggle".
* IT IS NEEDED TO CHOOSE ONE.
*/
export declare class PopupDeprecatedComponent implements AfterContentInit, OnDestroy, OnInit {
private elementRef;
private edgeDetector;
private changeDetectorRef;
private eventBusService;
private componentFactoryResolver;
private injector;
private appRef;
private logger;
private popupContainer;
width: string;
/**
* If additional styles should be applied to popup
*/
contextClass: string;
/**
* Allows popup box to be attached to document.body
*/
appendToBody: boolean;
isOpen: boolean;
manualOpenControl: Subject<MouseEvent>;
/**
* Defines in which direction popup area will be opened.
*/
directionTop: boolean;
/**
* Parent css element class used determining of popup direction to top.
*/
directionRight: boolean;
/**
* Parent css element class used determining of popup direction to right.
*/
baseElementSelector: string;
ariaLabel: string;
opened: EventEmitter<boolean>;
popupToggle: PopupToggleDirective;
popupAreaContainer: ElementRef;
popupAreaContent: ElementRef;
private popupSubscriptions;
private lastEventType;
private _popupInstance?;
get popupInstance(): ComponentRef<PopupContainerComponent> | undefined;
/** @ignore */
_directionRight: boolean;
/** @ignore */
_directionTop: boolean;
/**
* switches visibility of popup area
*/
visible: boolean;
constructor(elementRef: ElementRef, edgeDetector: EdgeDetectionService, changeDetectorRef: ChangeDetectorRef, eventBusService: EventBusService, componentFactoryResolver: ComponentFactoryResolver, injector: Injector, appRef: ApplicationRef, logger: LoggerService, popupContainer: PopupContainerService);
ngOnInit(): void;
ngAfterContentInit(): void;
toggleOpened(event: Event): void;
closePopup(event?: MouseEvent): void;
private setPopupPosition;
private deletePopupInstance;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<PopupDeprecatedComponent, [null, null, null, null, null, null, null, null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<PopupDeprecatedComponent, "nui-popup-deprecated", never, { "width": { "alias": "width"; "required": false; }; "contextClass": { "alias": "contextClass"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "manualOpenControl": { "alias": "manualOpenControl"; "required": false; }; "directionTop": { "alias": "directionTop"; "required": false; }; "directionRight": { "alias": "directionRight"; "required": false; }; "baseElementSelector": { "alias": "baseElementSelector"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "opened": "opened"; }, ["popupToggle"], ["*", "[popupAreaContent]"], false, never>;
}