UNPKG

ngx-rumbletalk

Version:

RumbleTalk Angular integration

76 lines (75 loc) 2.46 kB
import { OnInit, OnDestroy, OnChanges, ElementRef, SimpleChanges } from '@angular/core'; import { NgxRumbletalkService } from './ngx-rumbletalk.service'; import * as i0 from "@angular/core"; export declare class NgxRumbletalkComponent implements OnInit, OnDestroy, OnChanges { private service; iframeElement: ElementRef; chatDivElement: ElementRef; counterElement: ElementRef; hash: string; width: number; height: number; floating: boolean; side: string; image: string; counter: string; mobile: boolean; cdn: string; counterTop: number; counterLeft: number; constructor(service: NgxRumbletalkService); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; /** * Loads the iframe */ loadIframe(): void; /** * add the event listeners based on the embed type and device */ addListeners(): void; /** * hides the chat when the "Esc" key is clicked * @param {KeyboardEvent} event - the initiating event */ escClose(event: any): void; /** * handles postMessage requests * @param event - the event object */ info(event: any): void; /** * reloads the iframe (or parent page) in case of a server request */ reload(): void; /** * starts [repeatedly] trying to connect to the chat using postMessage */ instantiateQuery(): void; /** * instantiate a postppMessage connection with the chat */ query(): void; /** * checks if the given origin is of a chat service * @param origin - the URL of the origin * returns boolean */ validateOrigin(origin: any): boolean; handleImageLoad(event: any): void; /** * hides or shows the floating chat * @param boolean [esc] - if set to true, will force hide */ toggleFloatingChat(event?: any, esc?: boolean): void; /** * attaches the open chat event to the given target * @param Element target */ openChat(): void; handleIframeLoad(): void; handleIframeError(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgxRumbletalkComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgxRumbletalkComponent, "ngx-rumbletalk", never, { "hash": "hash"; "width": "width"; "height": "height"; "floating": "floating"; "side": "side"; "image": "image"; "counter": "counter"; }, {}, never, never, false, never>; }