UNPKG

fundamental-ngx

Version:

SAP Fiori Fundamentals, implemented in Angular

75 lines (74 loc) 3.31 kB
import { OnInit, EventEmitter } from '@angular/core'; import { HashService } from '../utils/hash.service'; import { Placement, PopperOptions } from 'popper.js'; import { PopoverDirective } from './popover-directive/popover.directive'; /** * The popover is a wrapping component that accepts a *control* as well as a *body*. * The control is what will trigger the opening of the actual popover, which is called the body. * By default, popovers are triggered by click. This can be customized through the *triggers* input. * PopoverComponent is an abstraction of PopoverDirective. */ export declare class PopoverComponent implements OnInit { private hasher; /** @hidden */ directiveRef: PopoverDirective; /** @Input Whether the popover should have an arrow. */ arrow: boolean; /** @Input Whether the popover is disabled. */ disabled: boolean; /** @Input Whether the popover should be treated as a dropdown. */ isDropdown: boolean; /** @Input The element to which the popover should be appended. */ appendTo: HTMLElement | 'body'; /** @Input The trigger events that will open/close the popover. * Accepts any [HTML DOM Events](https://www.w3schools.com/jsref/dom_obj_event.asp). */ triggers: string[]; /** @Input The placement of the popover. It can be one of: top, top-start, top-end, bottom, * bottom-start, bottom-end, right, right-start, right-end, left, left-start, left-end. */ placement: Placement; /** @Input Only to be used when the popover is used as a dropdown. The glyph to display. */ glyph: string; /** @Input Only to be used when the popover is used as a dropdown. The btnType to display. */ btnType: string; /** @Input Whether the popover is open. Can be used through two-way binding. */ isOpen: boolean; /** @Input Only to be used when the popover is used as a dropdown. Whether the dropdown is in compact format. */ compact: boolean; /** @Input Only to be used when the popover is used as a dropdown. Whether the dropdown is in a toolbar. */ toolbar: boolean; /** @Input The Popper.js options to attach to this popover. * See the [Popper.js Documentation](https://popper.js.org/popper-documentation.html) for details. */ options: PopperOptions; /** @Input Whether the popover should be focusTrapped. */ focusTrapped: boolean; /** @Input Whether the Popover Body should try to have the same width as the Popover Control. */ fillControl: boolean; /** @Input Whether the popover should close when a click is made outside its boundaries. */ closeOnOutsideClick: boolean; /** @Input Whether the popover should close when the escape key is pressed. */ closeOnEscapeKey: boolean; /** @Output Event emitted when the state of the isOpen property changes. */ isOpenChange: EventEmitter<boolean>; /** @hidden */ id: string; /** @hidden */ constructor(hasher: HashService); /** @hidden */ ngOnInit(): void; /** * Toggles the popover open state. */ toggle(): void; /** * Closes the popover. */ close(): void; /** * Opens the popover. */ open(): void; /** * Forces an update of the popover's positioning calculation. */ updatePopover(): void; }