/* Copyright © 2016-2019 Lidor Systems. All rights reserved. This file is part of the "IntegralUI Web" Library. The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License. A copy of the License should have been installed in the product's root installation directory or it can be found at http://www.lidorsystems.com/products/web/studio/license-agreement.aspx. This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws. */ import { Component, HostListener, ViewContainerRef, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core'; @Component({ selector: '', template: `

PopOver / Overview

Touch or click the left mouse button here to show a popover.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio.


Enabled
Auto-Pop Delay
Initial Delay
Position
Show Marker
Title

IntegralUI PopOver is a native Angular component that displays custom HTML content over specified element. It provides functionality that allows you to add a popover that will be displayed at specified position, with initial delay and how much time will remain active. This component is inherited from Tooltip component.

By clicking inside the element space, the PopOver will appear at position specfied in the control panel. The example uses a simple template that contais some text and Ok button, you can modify it and add any custom HTML elements or other Angular components in it.

In this example, there is a control panel where you can set different properties of PopOver component. You can choose the initial delay before popover is shown, how long it will remain visible, position at which will appear and whether it is enabled or not.

If activation is set to 'manual', the popup will remain active until it's closed by changing the popOverShow property to false. If popOverShow property is not specified, then the popover will appear on mouse enter.

The following properties are supported:

For more information check out the source code of this sample (popover/popover-overview.ts) file.

`, encapsulation: ViewEncapsulation.None }) export class PopOverOverviewSample { @ViewChild('application', {read: ViewContainerRef, static: false}) applicationRef: ViewContainerRef; public popoverPositions: any = [ 'mouse', 'above', 'below', 'left', 'right' ]; public popoverSettings: any = { activation: 'manual', appRef: null, autoPopDelay: 3000, closeButton: true, enabled: true, header: true, initialDelay: 100, position: 'right', showMarker: true, title: 'PopOver Title' } public isPopoverActive: boolean = false; constructor(){} ngAfterViewInit(){ this.popoverSettings.appRef = this.applicationRef; } updateEnabled(){ this.popoverSettings.enabled = !this.popoverSettings.enabled; } updateShowMarker(){ this.popoverSettings.showMarker = !this.popoverSettings.showMarker; } toggle(e: any){ this.isPopoverActive = !this.isPopoverActive; e.stopPropagation(); } @HostListener('click', ['$event']) onWindowClick(e: any){ this.isPopoverActive = false; } btnOk(){ this.isPopoverActive = false; alert("Ok button is clicked!"); } onClose(){ this.isPopoverActive = false; } }