UNPKG

smart-webcomponents-angular

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

133 lines (132 loc) 8.55 kB
import { Toast } from './../index'; import { Animation, ToastPosition, ToastType } from './../index'; import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core'; import { BaseElement } from './smart.element'; import * as i0 from "@angular/core"; export { Animation, ToastPosition, ToastType, ElementRenderMode } from './../index'; export { Smart } from './smart.element'; export { Toast } from './../index'; export declare class ToastComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges { constructor(ref: ElementRef<Toast>); private eventHandlers; nativeElement: Toast; /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties?: {}): any; /** @description Sets or gets the animation mode. Animation is disabled when the property is set to 'none' */ get animation(): Animation | string; set animation(value: Animation | string); /** @description Specifies the container where new openned toast items will be displayed. The value can be an HTMLElement or element's id. This property is in relation with modal(lower priority than modal) and position(higher priority than position) properties. */ get appendTo(): string; set appendTo(value: string); /** @description Sets or gets whether the toast will automatically close after duration equal to the autoCloseDelay property. */ get autoClose(): boolean; set autoClose(value: boolean); /** @description Sets or gets the duration after which the toast automatically closes (works only if the autoClose property is set to true). */ get autoCloseDelay(): number; set autoCloseDelay(value: number); /** @description Sets whether the toast will open automatically immediately after widget's initialization. */ get autoOpen(): boolean; set autoOpen(value: boolean); /** @description The user will not be able to interact with toast items when disabled is set to true. */ get disabled(): boolean; set disabled(value: boolean); /** @description Sets custom icon className which overrides the default one. Multiple class names can be applied by separating them with a space. Useful when loading from a third-party icon library (such as Bootstrap). */ get iconClass(): string; set iconClass(value: string); /** @description Adds a custom class to Toast items. Multiple class names can be applied by separating them with a space. Useful when styling by using predefined class names from a third-party CSS library (such as Bootstrap). */ get itemClass(): string; set itemClass(value: string); /** @description Sets custom item template. */ get itemTemplate(): string; set itemTemplate(value: string); /** @description Sets or gets the unlockKey which unlocks the product. */ get unlockKey(): string; set unlockKey(value: string); /** @description Sets or gets the language. Used in conjunction with the property messages. */ get locale(): string; set locale(value: string); /** @description Callback, related to localization module. */ get localizeFormatFunction(): any; set localizeFormatFunction(value: any); /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */ get messages(): any; set messages(value: any); /** @description In modal mode the toast item is positioned in the center of the screen. This property is with higher priority than position and appendTo. If modal is set to true these properties are disregarded. */ get modal(): boolean; set modal(value: boolean); /** @description Sets the part of the browser window where the toast will be positioned. The position property is disregarded if appendTo or modal are set. */ get position(): ToastPosition | string; set position(value: ToastPosition | string); /** @description If the element is readonly, users cannot interact with it. */ get readonly(): boolean; set readonly(value: boolean); /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ get rightToLeft(): boolean; set rightToLeft(value: boolean); /** @description Sets or gets whether to show the toast item's close button. */ get showCloseButton(): boolean; set showCloseButton(value: boolean); /** @description Determines the theme. Theme defines the look of the element */ get theme(): string; set theme(value: string); /** @description Sets speciffic CSS settings and icon to the toast items. */ get type(): ToastType | null | string; set type(value: ToastType | null | string); /** @description If is set to true, the element cannot be focused. */ get unfocusable(): boolean; set unfocusable(value: boolean); /** @description Sets a text value to an toast item. */ get value(): any; set value(value: any); /** @description This event is triggered when the toast item is clicked. * @param event. The custom event. */ onItemClick: EventEmitter<CustomEvent>; /** @description This event is triggered when the toast item is closed. * @param event. The custom event. */ onClose: EventEmitter<CustomEvent>; /** @description This event is triggered when the toast item is opened. * @param event. The custom event. */ onOpen: EventEmitter<CustomEvent>; /** @description This event is triggered on swipebottom over an toast item. * @param event. The custom event. */ onSwipebottom: EventEmitter<CustomEvent>; /** @description This event is triggered on swipeleft over an toast item. * @param event. The custom event. */ onSwipeleft: EventEmitter<CustomEvent>; /** @description This event is triggered on swiperight over an toast item. * @param event. The custom event. */ onSwiperight: EventEmitter<CustomEvent>; /** @description This event is triggered on swipetop over an toast item. * @param event. The custom event. */ onSwipetop: EventEmitter<CustomEvent>; /** @description Closes all opened toast items. */ closeAll(): void; /** @description Closes particular toast item. * @param {HTMLElement | string} item. The toast item (or its id) to remove. */ closeItem(item: HTMLElement | string): void; /** @description Closes the last opened toast item. */ closeLast(): void; /** @description Opens a new toast item and returns the opened smart-toast-item instance. * @param {HTMLElement | string} value?. The value for the toast item. If not set, the value property will be used. * @param {string} iconType?. The icon name for the toast item. If not set, the type property determines the icon type that will be used. * @returns {HTMLElement} */ open(value?: any, iconType?: any): Promise<any>; openSync(value?: any, iconType?: any): HTMLElement; get isRendered(): boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; /** @description Add event listeners. */ private listen; /** @description Remove event listeners. */ private unlisten; static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ToastComponent, "smart-toast, [smart-toast]", ["smart-toast"], { "animation": "animation"; "appendTo": "appendTo"; "autoClose": "autoClose"; "autoCloseDelay": "autoCloseDelay"; "autoOpen": "autoOpen"; "disabled": "disabled"; "iconClass": "iconClass"; "itemClass": "itemClass"; "itemTemplate": "itemTemplate"; "unlockKey": "unlockKey"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "messages": "messages"; "modal": "modal"; "position": "position"; "readonly": "readonly"; "rightToLeft": "rightToLeft"; "showCloseButton": "showCloseButton"; "theme": "theme"; "type": "type"; "unfocusable": "unfocusable"; "value": "value"; }, { "onItemClick": "onItemClick"; "onClose": "onClose"; "onOpen": "onOpen"; "onSwipebottom": "onSwipebottom"; "onSwipeleft": "onSwipeleft"; "onSwiperight": "onSwiperight"; "onSwipetop": "onSwipetop"; }, never>; }