fundamental-ngx
Version:
SAP Fiori Fundamentals, implemented in Angular
67 lines (66 loc) • 2.81 kB
TypeScript
import { OnInit, ElementRef, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Type, AfterViewInit, ViewContainerRef, TemplateRef, EmbeddedViewRef, EventEmitter } from '@angular/core';
import { HashService } from '../utils/hash.service';
import { AlertRef } from './alert-utils/alert-ref';
import { AbstractFdNgxClass } from '../utils/abstract-fd-ngx-class';
/**
* The component that represents an alert. It can be only be used inline.
* If the AlertService is used, this component is auto-generated.
*/
export declare class AlertComponent extends AbstractFdNgxClass implements OnInit, AfterViewInit {
private hasher;
private elRef;
private cdRef;
private componentFactoryResolver;
private alertRef;
/** @hidden */
containerRef: ViewContainerRef;
/** @Input Whether the alert is dismissible. */
dismissible: boolean;
/** @Input The type of the alert. Can be one of *warning*, *success*, *information*, *error* or null. */
type: string;
/** @Input Id for the alert component. If omitted, a unique one is generated. */
id: string;
/** @Input Duration of time *in milliseconds* that the alert will be visible. Set to -1 for indefinite. */
duration: number;
/** @Input Whether the alert should stay open if the mouse is hovering over it. */
mousePersist: boolean;
/** @Input Id of the element that labels the alert. */
ariaLabelledBy: string;
/** @Input Aria label for the alert component element. */
ariaLabel: string;
/** @Input Width of the alert. */
width: string;
/** @Input Alternative way of passing in a message to the alert. */
message: string;
/** @Output Event fired when the alert is dismissed. */
onDismiss: EventEmitter<undefined>;
/** @hidden */
mouseInAlert: boolean;
/** @hidden */
componentRef: ComponentRef<any> | EmbeddedViewRef<any>;
/** @hidden */
childComponentType: Type<any> | TemplateRef<any> | string;
/** @hidden */
constructor(hasher: HashService, elRef: ElementRef, cdRef: ChangeDetectorRef, componentFactoryResolver: ComponentFactoryResolver, alertRef: AlertRef);
/** @hidden */
ngOnInit(): void;
/** @hidden */
ngAfterViewInit(): void;
/**
* Dismisses the alert. If the alert was generated via the AlertService, it is removed from the DOM.
* Otherwise, it sets the display value to none. Fires the onDismiss event.
* @param manualDismiss Set to true to skip the dismiss animation.
*/
dismiss(manualDismiss?: boolean): void;
/**
* Opens the alert.
*/
open(): void;
/** @hidden */
handleAlertMouseEvent(event: any): void;
/** @hidden */
_setProperties(): void;
private loadFromTemplate;
private loadFromComponent;
private loadFromString;
}